I am in the process of writing a library (c# .net 4.0) for use in a number of applications. One of the requirements is that the library returns slightly different results to calls depending on whether or not the application is deployed and running via clickonce.
I've had a search around but cannot find any way that an assembly can determine if the 'hosting' application is clickonce deployed.
Any pointers would be appreciated.
Add reference to System.Deployment
, after that you can use:
Application.ApplicationDeployment.IsNetworkDeployed
If you need to pass arguments to application, then use:
var args = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With