我想使用类似下面的代码,但在.NET Core WPF C#应用程序中使用。这是我以前使用过的。
public static string GetVersion()
{
if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
{
Version myVersion = ApplicationDeployment.CurrentDeployment.CurrentVersion;
return $"Version {myVersion}";
}
return "Version not deployed";
}
.NET Core有类似的功能吗?