2

目标是使用 squirrel.windows 进行部署,以便可以安装、更新、卸载并在 Windows 10 的程序和功能中查看它。添加最后一个 MyApp.msi 文件将是一个加号。

案例 1: 我使用 Nuget 包资源管理器创建了一个 NugetPackage。然后通过包管理器控制台“squirrel --releasify myNuget.1.0.0.nupkg”发布它,获取发布文件,单击 setup.exe 进行安装,应用程序的图标出现在 Windows 菜单中。

在 Windows 程序和功能中,它不会出现在已安装的应用程序列表中。

当我部署我的应用程序的下一个 nugetPackage 时,更新正在工作。它创建了一个很好的 myApp.msi 文件。

案例 2: 当我在 GitHub 上使用 Squirrel 应用程序“ https://github.com/Squirrel/Squirrel.Windows ”时,它会显示出来。- 极好的。

当我部署我的应用程序的下一个 nugetPackage 时,更新不起作用。它不会创建myApp.msi 文件。

使用小型 testApp,它使用完全相同的代码,但也没有 myApp.msi 文件。不同之处在于它使用 DevExpress Dll,并且在生产应用程序中有 54 个 Dll。myTestApp 中有 13 个 Dll。

安装和更新代码

public static async Task CheckForUpdates()
{
    using (var mgr = new UpdateManager(DEPLOYMENT_PATH))
    {
        // Note, in most of these scenarios, the app exits after this method
        // completes!
        SquirrelAwareApp.HandleEvents(
            onInitialInstall: v => mgr.CreateShortcutForThisExe(),
            onAppUpdate: v => mgr.CreateShortcutForThisExe(),
            onAppUninstall: v => mgr.RemoveShortcutForThisExe(),
            onFirstRun: () => ShowTheWelcomeWizard = true);
    }
}

public static bool ShowTheWelcomeWizard { get; set; }

请帮助我实现我的目标。

问候弗雷迪

4

0 回答 0