ClickOnce Deployment with Shared Resources
I am deploying a solution to a networking share using ClickOnce. There are some resources (xml files) that should remain on the network drive and be shared among users - i.e. I do not wish for a local copy o开发者_开发技巧f these files to be made.
How can I achieve this without hard-coding the ClickOnce deployment path into my project?
Thanks,
Daniel
You can't include the files in the ClickOnce publishing to the file share and not include them in the deployment to the client. The only way to do that is to put the files there yourself.
The difficulty lies in getting the location of the deployment. I vaguely remember that the activationURI is only available if the user runs it by calling the link to the application file in the browser or the application is online-only. You could try making your app online only and retrieving that property and see if it's not null.
The one you're interested in in ApplicatoinDeployment.CurrentDeployment.ActivationUri.
Have you considered including them as an embedded resource?
RobinDotNet
精彩评论