什么类将取代“ApplicationDeployment”在dotnet6中如何操作“clickonce” dotnet6 中的应用程序?
我想在dotnet6中使用“applicationdeployment”来检查更新,但我发现它不存在。我该怎么办?所以我想知道如何在dotnet6中操作“clickonce”应用程序。
这是它在 dotnet 框架中的工作原理,但我现在想在 dotnet6 中执行此操作
public static void InstallUpdateSyncWithInfo(bool silenceCheck = false)
{
UpdateCheckInfo info = null;
if (ApplicationDeployment.IsNetworkDeployed)
{
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
info = ad.CheckForDetailedUpdate();
if (info.UpdateAvailable)
{
Boolean doUpdate = true;
if (!info.IsUpdateRequired)
{
DialogResult dr = XtraMessageBox.Show("软件发布了新的版本,你希望更新它吗?", "更新提示", MessageBoxButtons.OKCancel);
if (!(DialogResult.OK == dr))
{
doUpdate = false;
}
}
else
{
XtraMessageBox.Show(info.MinimumRequiredVersion.ToString(),MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
}
}
}
i want to used 'applicationdeployment' in dotnet6 for checking updates,but i found that it is not exisit.what can i do?so i want to know how to operate 'clickonce' app in dotnet6.
Here's how it works in dotnet framwork, but I want to do it in dotnet6 now
public static void InstallUpdateSyncWithInfo(bool silenceCheck = false)
{
UpdateCheckInfo info = null;
if (ApplicationDeployment.IsNetworkDeployed)
{
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
info = ad.CheckForDetailedUpdate();
if (info.UpdateAvailable)
{
Boolean doUpdate = true;
if (!info.IsUpdateRequired)
{
DialogResult dr = XtraMessageBox.Show("软件发布了新的版本,你希望更新它吗?", "更新提示", MessageBoxButtons.OKCancel);
if (!(DialogResult.OK == dr))
{
doUpdate = false;
}
}
else
{
XtraMessageBox.Show(info.MinimumRequiredVersion.ToString(),MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论