'what class will replace 'ApplicationDeployment' in dotnet6?how to operate 'clickonce' app in dotnet6?

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);
            }
        }
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source