如何为UWP软件包安装程序添加Microsoft.NET.CoreRuntime.2.1? [英] How to add Microsoft.NET.CoreRuntime.2.1 for UWP package installer?

查看:220
本文介绍了如何为UWP软件包安装程序添加Microsoft.NET.CoreRuntime.2.1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Xamarin应用程序.我可以构建ipa,APK和UWP(.appx)软件包. ipa和APK正常运行.我在安装UWP时遇到问题.

I have Xamarin Application. I can build ipa, APK and UWP(.appx) package. ipa and APK is working fine. I am facing issue while installing UWP.

UWP的问题:它要求安装Microsoft.NET.CoreRuntime.2.1,因为它是依赖项之一.

Issue with UWP: It is asking to install Microsoft.NET.CoreRuntime.2.1 as it is one of the dependencies.

我是否需要在项目中添加Microsoft.NET.CoreRuntime.2.1?如果是这样,在哪里?有人可以建议吗?

Do I need to add Microsoft.NET.CoreRuntime.2.1 in project? If so, where? Can anybody please suggest?

我按照以下步骤提供了创建的程序包

I gave created package with following steps

1:右键单击UWP项目->存储->选择创建应用程序包

1: Right click UWP project-> Store-> Select create app packages

2:现在,在调试模式下,我们不需要将其上载到商店,这就是为什么 选择No

2: Now in debug mode we don't need to upload it to the store that's why I select No

3:比我提供输出位置的路径.提供版本,并选择从不生成应用程序捆绑包,并根据需要选择x86和x64体系结构

3: Than I give path for output location. Give version and select generate app bundle as never and select x86 and x64 architecture as requirement

4:它生成软件包

创建软件包后,用户需要手动安装软件包文件夹中提供的这些Microsoft.NET.CoreRuntime.2.1Microsoft.VCLibs.x64.14.00.

After creating package, user need to install these Microsoft.NET.CoreRuntime.2.1 and Microsoft.VCLibs.x64.14.00 manually which is given in package folder.

嗯,我认为这不是用户需要手动安装依赖项的理想情况.它应该在项目中,或者根据需要与软件包一起自动安装.

Well, I think this is not ideal case where user need to install the dependencies manually. It should be there in project or it should be install automatically with package as per-requisite.

让我告诉您我们如何安装它.我知道可以使用PowerShell进行安装,但是我对此没有完全的了解.

Let me tell you how we install it. I know there is option to install using PowerShell but I don't have thoroughly idea about it.

1-证书安装 -MyApp.UWP_1.0.0.0_x86/MyApp.UWP_1.0.0.0_x64.cer -点击安装证书 -选择商店位置作为本地计算机" -点击下一步 -它会向您发出有关安装证书的警报,请按是" -比选择将所有证书都放在以下存储中 -通过浏览选项启用下面的文本框,单击浏览并选择受信任的根证书颁发机构" -单击下一步,完成并关闭

1- Certificate Installation - MyApp.UWP_1.0.0.0_x86/MyApp.UWP_1.0.0.0_x64.cer - Click on Install Certificate - Select store location as "Local Machine" - Click on Next - It gives you a alert about installation certificate press "Yes" - Than select place all certificate in following store - It enables below textbox with browse option click on browse and select "Trusted Root Certification Authorities" - Click on Next, Finish and Close

2-安装依赖项 -打开依赖关系-> x86/x64文件夹 -安装两个文件

2- Install Dependencies - Open Dependencies --> x86/x64 folder - Install both files

3-软件包安装 -双击"MyApp.appx"

3- Package Installation - Double click on "MyApp.appx"

请指导我.

推荐答案

系统要求您安装依赖项的原因是,您的UWP应用对它们具有依赖项要求,但是当前的设备操作系统未安装这些依赖项.如果您从Microsoft商店安装应用程序,则商店将检查您的应用程序要求并自动安装您的应用程序需要但未安装的依赖项.

The reason why you are asked to install the dependencies is that your UWP app have a dependency requirement for them but your current Device OS doesn't install these dependencies. If you install your app from the Microsoft Store, the Store will check your app requirments and automatically install the dependencies that your app need but are not installed.

对于您的问题,您正在旁载您的UWP应用程序,因为没有像Store这样的过程来安装您的应用程序需要但尚未安装在当前设备中的依赖项,因此您将需要手动安装依赖项.

For your issue, you are sideloading your UWP app, since there is no a process as Store to install the dependencies that your app need but are not installed in current device, so you will need to install the dependency manully.

通常,您可以从相应版本包的文件夹(与appx文件相同的文件路径)的 Dependencies 文件夹中找到依赖项.您应该在设备和UWP App appx平台上安装相应的依赖项.

Generally, you can find the dependencies in the Dependencies folder from the corresponding version package's folder (same file path as your appx file). You should install the corresponding dependencies base on your device and the your UWP App appx platform.

---更新---

如果要使用PowerShell安装应用程序,则仍然需要安装依赖项.您可以使用Add-AppxPackage cmdlet将已签名的应用程序包添加到用户帐户,并使用DependencyPath参数来添加安装该应用程序包所需的所有其他程序包.请参阅主题 Add-AppxPackage 示例1 :添加应用程序包以安装应用程序和依赖项.

If you want to install the app using PowerShell, you still need to install the dependencies. You can use the Add-AppxPackage cmdlet to add a signed app package to a user account and use the DependencyPath parameter to add all other packages that are required for the installation of the app package. See the topic Add-AppxPackage and the Example 1: Add an app package to install the app and dependencies.

PS C:\> Add-AppxPackage -Path "C:\Users\user1\Desktop\MyApp.appx" -DependencyPath "C:\Users\user1\Desktop\Microsoft.NET.CoreRuntime.2.1.appx"

这篇关于如何为UWP软件包安装程序添加Microsoft.NET.CoreRuntime.2.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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