MSIX Core解决方案构建错误 [英] MSIX Core solution build errors

查看:132
本文介绍了MSIX Core解决方案构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MSIX软件包,我需要该软件包使用户能够从网页上安装Windows 10 build 1709之前的Windows版本。MSIXCore可以实现。
但是这里的文档找到安装程序


Windows 10机器会立即识别安装程序。


如果您想了解有关msix软件包的更多信息,请提供很好的解释此处


我希望本指南可以帮助您使部署系统正常工作


I have an MSIX package that I need to be able to allow users to install from a web page on versions of Windows older than Windows 10 build 1709. This is possible with MSIX Core. However the documentation here https://docs.microsoft.com/en-us/windows/msix/msix-core/msixcore-clickonce-solution requires that the MSIX Core solution be built and published in Visual Studio 2017. I have tried this in visual studio 2019 because that is what I had installed but projects in the solution use the deprecated std::experimental::filesystem namespace that is not available in VS 2019. I installed Visual Studio 2017 but I'm still having build errors.

Has anyone successfully built the MSIX Core 1.1 release solution?

Thank you, Brett Burgeson

解决方案

EDIT: Microsoft is going to continue support of ClickOnce in .NET 5.

You can deploy .NET Core and .NET 5 applications internally in an organization by sideloading msix packages.

I have been successfully using Clickonce for deploying .NET line of business applications for years.

Now that I’m updating my apps to .NET Core I wanted something similar to Clickonce. In other words: publishing your installer in a network share and deploying your autoupdating app to your clients by simply coping a shortcut to your installer.

You can achieve this with msix packages. The problem is that you are limited to Windows 10 version 1709, and later

The solution came on December 19th with MSIX Core 1.1. Packaging your app with msix core support you can target Windows 7 SP1 and later, and this is something I needed because at work we are slowly transitioning to Windows 10 from Windows 7 and I still have to support old versions of windows.

The steps for packaging your .net core app using msix core are:

  1. Create a Windows application packaging project in your solution.

  2. Right click on the Applications subfolder of your Windows application packaging project and select Add Reference. Then select your target project.

  3. Change your Package.manifest (reference: msix-packaging/MsixCore at master · microsoft/msix-packaging · GitHub) Right click your Package.manifest file and select View code Change your to:

      <Dependencies>
        <TargetDeviceFamily Name="MSIXCore.Desktop" MinVersion="6.1.7601.0" MaxVersionTested="10.0.10240.0" />
        <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.16299.0" MaxVersionTested="10.0.18362.0" />
      </Dependencies>
    

    With this you stablish your min version to MSIXCore.Desktop in other words Windows 7 sp1.

  4. Right click your Windows application packaging project and select Publish then Create App Packages.

  5. Choose Sideloading then check Enable automatic updates.

  6. In order to install the package in the client machine you must sign it. I recommend you to create a self-signed certificate. You must install the certificate in the client machine so that the package is trusted and you can install it. If you are in a domain you can deploy your self-signed certificate with a group policy. The optimal situation is to sign the package with a trusted certificate provided by a trusted root certification authority. My personal choice is to create a certificate in my own windows certification authority (which is trusted in my local domain). If you decide to sign your package with a trusted cert this is the command line:


  .\SignTool.exe sign /fd SHA256 /a /f yourcert.pfx /p yourpassword *.appx

  1. Select Generate app bundle to Never.

  1. Select your network share for publishing the package

In order to execute your package installer in Windows 7 sp1 machines you must previously install msixmgrSetup-1.1.0.0-x64.msi or msixmgrSetup-1.1.0.0-x86.msi accordingly. You can find the installer here

Windows 10 machines will recognize the installer right away.

If you want to know more about msix packages you have a good explanation here

I hope this guide helps you to get your deployment system working.

这篇关于MSIX Core解决方案构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆