Can't Build app Packages for UWP store submission

邮差的信 提交于 2019-12-23 06:16:05

问题


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 :

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

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.

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.

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


回答1:


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.




回答2:


Building app for .NET Native in release mode can take a very long time. It can even take as much as 10 minutes for larger apps. So make sure to give the compiler the time it needs. It might seem it is building forever, but it should definitely finish.



来源:https://stackoverflow.com/questions/54079897/cant-build-app-packages-for-uwp-store-submission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!