Detecting a ClickOnce Application

Q: How do I tell if I'm currently running in the context of a ClickOnce application?

A: You can see if a ClickOnce application is running in the current AppDomain by checking the AppDomain.CurrentDomain.ActivationContext property. If that value is non-null, then the domain is running a ClickOnce application. The ActivationContext will also get you the name of that application. There may be situations (such as choosing an isolated storage scope), where having this information is necessary and useful.

For more info, visit http://blogs.msdn.com/shawnfa/archive/2006/01/20/514411.aspx

Comments

Popular posts from this blog

Using VB Script to display part of an IP address

Working with double quotes (") in VB.Net

Oct'18 Meeting Wrap-up