Determine Click Once Publish Directory
How do I reference the ClickOnce directory to which my application was published?
I've tried ApplicationDeployment.CurrentDeployement.Da开发者_如何转开发taDirectory and Assembly.GetExecutingAssembly().Location but they point to where the application is installed.
is ActivationUri what you are looking for:
ApplicationDeployment.CurrentDeployment.ActivationUri
The publish url is stored in the .csproj file:
<PublishUrl>[Your path goes here]</PublishUrl>
I suspect this isn't much use to you at run-time though.
精彩评论