0

I am fairly new to the UWP platform, and I'm having a bit of trouble trying to create my app package. The release build works fine, but when I try to make an app package for side-loading I get the following error.

Severity    Code    Description Project File    Line    Suppression State
Error       Payload contains two or more files with the same destination path 'System.Runtime.CompilerServices.Unsafe.dll'. Source files: 
C:\Users\micha\.nuget\packages\runtime.win10-x64-aot.microsoft.netcore.universalwindowsplatform\6.2.2\runtimes\win10-x64-aot\lib\uap10.0.15138\System.Runtime.CompilerServices.Unsafe.dll
C:\Users\micha\.nuget\packages\system.runtime.compilerservices.unsafe\4.5.1\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll   AN Solve-IT         

It does seem that there are some dependencies in my project that contain the same class, but I'm not sure how to fix the problem.

In my project I have the following installed.

Microsoft.NETCore.UniversalWindowsPlatform 6.2.2
Microsoft.EntityFrameworkCore.Sqlite 2.2.0
Newtonsoft.JSON 12.0.1

I also have two supporting projects. One is a class library and the other is a migrations app. Combined they use the following.

Microsoft.EntityFrameworkCore.Tools 2.2.0
Microsoft.NETCore.App 2.1.0
NETStandard.Library 2.0.3

As I said above I can see there seems to be a file conflict in these two libraries, but I'm just not sure how to handle the issue. Any help would be greatly appreciated!

--- UPDATE ---

I followed the advice below which was to downgrade my UWP framework down to 2.1.9, but when I did that I get the following error.

Severity    Code    Description Project File    Line    Suppression State
Error       One of your dependencies requires the .NET Framework, but the .NET Framework could not be found in the NuGet packages installed in this project.  Please install the appropriate .NET Framework packages required by your dependency

I have verified that I have the .NET framework installed and it is referenced correctly in my project. I am able to do a local build and run on my machine. Any ideas as to what this could be?

4

1 回答 1

2

将您的软件包降级Microsoft.NETCore.UniversalWindowsPlatform到最新的稳定版 6.1.9,因为您拥有的当前版本因存在问题而被清除。

更新:如果您遇到像提到的帖子那样的错误,也可以一一降级其他软件包。

于 2019-01-03T15:02:30.553 回答