更新时间:2022-12-21 11:16:47
阅读本文:http://***.com/questions/14485914/cannot-find-applicationdeployment-in-system-deployment [ ^ ]
好的,我知道为什么它不起作用。
我认为使用WPF而不是WinForms时c#是不同的,但它没有。
我的代码是正确的,但我忘了添加 System.Deployment.dll 作为资源。
感谢Mehdi Gholam提供有用的链接! :)
Hi,
I don't use Assembly Version, so I'd like to know I can get the ClickOnce Version in an WPF c# Program.
When I use the Following Code:
if (ApplicationDeployment.IsNetworkDeployed)
{
Version version = ApplicationDeployment.CurrentDeployment.CurrentVersion;
}
I get get the following Error:
The name 'ApplicationDeployment' does not exist in the current context
I already tried to implement System.Deplayoment, but it didn't worked :/
Please Help, thanks.
Read this : http://***.com/questions/14485914/cannot-find-applicationdeployment-in-system-deployment[^]
Okay, i know why it didn't worked.
I thought c# is diffrent when using WPF instead of WinForms, bhut it didn't.
my Code was correct, but i forgot to add the System.Deployment.dll as Resource.
Thanks to Mehdi Gholam for the useful Link! :)