gpt4 book ai didi

xamarin - UWP : Payload contains two or more files with the same destination path

转载 作者:行者123 更新时间:2023-12-02 18:35:19 26 4
gpt4 key购买 nike

嘿嘿,

我现在正在使用 Xamarin.Forms,今天当我尝试发布编译我的应用程序的 UWP 项目时出现以下错误(调试正在运行):

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

项目共享库编译为 netstandard2.0,并再次包含 netstandard2.0 库本身,尽管我不认为这应该是一个问题。

UWP项目引用了“通用Windows”和(自编译)SQLite.Net图书馆。它还引用了“Microsoft.NETCore.UniversalWindows”NuGet 包,但我卸载了它(试图解决上述问题)。我还尝试清理和重新编译解决方案、删除和恢复实际的 NuGet 目录、添加和删除引用、升级和降级 UWP 包、更改解决方案项目的构建顺序...但没有任何效果。

有人知道我可以在这里做什么吗?我的主要问题是该错误似乎来自 .NET 包,我无法在不破坏整个项目的情况下交换/删除这些包...

最佳答案

感谢this question我找到了解决问题的方法。

虽然它不是我的(项目属性->构建->构建目标)下的构建目标,但我注意到“使用 .NET Native 工具链编译”复选框。我删除了勾号,项目可以正常编译以发布。

关于xamarin - UWP : Payload contains two or more files with the same destination path,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52817396/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com