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


Popular posts from this blog

Working with double quotes (") in VB.Net

Using VB Script to display part of an IP address

Object reference not set to an instance of an object when using HTMLEditorExtender