无法为UWP商店提交构建应用程序包 [英] Can't Build app Packages for UWP store submission

查看:121
本文介绍了无法为UWP商店提交构建应用程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了Xamarin.Forms应用程序,现在我想将UWP项目部署到商店中,但是无法创建应用程序包. 使用Microsoft.NetCore.UniversalWindowsPlatform 6.2.2或6.2.0-preview I时 在发布模式下,我不断收到此错误:

I have written a Xamarin.Forms application and now I want to deploy the UWP project to the store but I can't create app packages. When using Microsoft.NetCore.UniversalWindowsPlatform 6.2.2 or 6.2.0-preview I in release mode, I constantly get this error :

有效负载包含两个或多个文件,这些文件具有相同的目标路径"System.Runtime.CompilerServices.Unsafe.dll".源文件: C:\ Users \ john.nuget \ packages \ runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform \ 6.2.0-preview1-26926-04 \ runtimes \ win10-x86-aot \ lib \ uap10.0.15138 \ System .Runtime.CompilerServices.Unsafe.dll C:\ Users \ john.nuget \ packages \ system.runtime.compilerservices.unsafe \ 4.5.0 \ lib \ netstandard2.0 \ System.Runtime.CompilerServices.Unsafe.dll OfflineCurrencyConverter.UWP

Payload contains two or more files with the same destination path 'System.Runtime.CompilerServices.Unsafe.dll'. Source files: C:\Users\john.nuget\packages\runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform\6.2.0-preview1-26926-04\runtimes\win10-x86-aot\lib\uap10.0.15138\System.Runtime.CompilerServices.Unsafe.dll C:\Users\john.nuget\packages\system.runtime.compilerservices.unsafe\4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll OfflineCurrencyConverter.UWP

但是我遵循了 GitHub问题的答案,说我应该降级该软件包到6.1.9.

But I followed the answer to this GitHub issue saying I should downgrade the package to 6.1.9.

这样做会导致我的应用程序永远构建……构建永远不会停止.

Doing this causes my application to build for ever... the build never stops.

但是,当我禁用.NET Native Tool链时,它将构建并在发布模式下运行,但是仍然无法创建包.请问有人有解决方案吗?我很沮丧.

But when I disable .NET Native Tool chain, it builds and run in release mode but packages can't still be created. Please does anyone have a solution ? I'm frustrated.

我感到浪费了整个应用的开发,并且意识到这个UWP项目最终不能打包.

I feel wasted building a whole app and realizing it can't be packaged at the end for this UWP project.

推荐答案

如果花费的时间比在发布模式下构建所需的时间长,请通过安装Microsoft.Net.Native.Compiler 使用nuget版本的.net native .在项目中 nuget上的包并照常重建.此解决方案可以解决您目前遇到的同样的问题.

If it took way longer than you expected to build in release mode, use nuget version of .net native by installing Microsoft.Net.Native.Compiler package on nuget in your project and re-build it as usual. This solution solves the very same problem you have now in my experience.

这篇关于无法为UWP商店提交构建应用程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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