简体   繁体   English

负载包含具有相同目标路径的文件

[英]Payload contains files with the same destination path

I have build a UWP application, that until recently has been working.我已经构建了一个 UWP 应用程序,直到最近一直在工作。 Although recently I have been getting an error while compiling for Release.虽然最近我在编译发布时遇到了一个错误。

Payload contains two or more files with the same destination path 'System.Runtime.CompilerServices.Unsafe.dll'. Source files: 
C:\Users\Cj\.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\Cj\.nuget\packages\system.runtime.compilerservices.unsafe\4.5.1\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll

The exception kind of speaks for itself, except I have no idea what packages are calling the file, or how to solve the issue.异常类型不言自明,除了我不知道哪些包正在调用文件,或者如何解决问题。 I have found answers for different libraries that don't work for my situation.我找到了不适合我的情况的不同库的答案。 And another that said "Uncheck the Compile with .NET Native tool chain" in the build properties, but then the .appxupload bundle doesn't get generated when building for the store.另一个在构建属性中说“取消选中使用 .NET Native 工具链编译”,但是在为商店构建时不会生成 .appxupload 包。

These are the packages that are installed ( https://imgur.com/a/KaUqdIw )这些是已安装的软件包 ( https://imgur.com/a/KaUqdIw )

NuGet packages

I have updated all these packages except我已经更新了所有这些包,除了

  • Newtonsoft.Json牛顿软件
  • Win2d.uwp Win2d.uwp

I appreciate any help.我很感激任何帮助。 Thanks谢谢

EDIT - ADDED INFORMATION编辑 - 添加的信息

I should also state that there is also a .Net Core DLL referenced by the application.我还应该声明,应用程序还引用了一个 .Net Core DLL。

I believe that I have found the NuGet Package that is causing the exception.我相信我已经找到了导致异常的 NuGet 包。 It seems to be the Microsoft.NETCore.UniversalWindowsPlatform Package.它似乎是 Microsoft.NETCore.UniversalWindowsPlatform 包。

When the package is updated to the 6.2.0 preview build, the exception occurs.当包更新到 6.2.0 预览版时,出现异常。 When downgraded to the latest stable, 6.1.9, the exception no longer occurs/changes.当降级到最新的稳定版 6.1.9 时,异常不再发生/变化。

However, when building for x86 a new exception comes up,但是,在为 x86 构建时出现了一个新异常,

ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.net.native.compiler\2.1.8\tools\x86\ilc\Tools\nutc_driver.exe @"C:\Users\Cj\Documents\Project\GoMobile\Main Branch\GoMobile\GoMobile\GoMobile.UWP\obj\x86\Release\ilc\intermediate\MDIL\GoMobile.rsp"' returned exit code -1073740791

I do not know what is causing the new error.我不知道是什么导致了新错误。 The package does build when targeting x64.该软件包在面向 x64 时构建。

将 system.runtime.compilerservices.unsafe 包参考升级到 4.5.2 也解决了该问题,同时让您继续使用最新的通用 Windows 平台包。

I see the same error message on upgrading to latest version of Microsoft.NETCore.UniversalWindowsPlatform 6.2.2 running latest VS2017 15.9.1我在升级到最新版本的 Microsoft.NETCore.UniversalWindowsPlatform 6.2.2 运行最新的 VS2017 15.9.1 时看到相同的错误消息

Payload contains two or more files with the same destination path 'System.Runtime.CompilerServices.Unsafe.dll'.有效负载包含两个或多个具有相同目标路径“System.Runtime.CompilerServices.Unsafe.dll”的文件。 Source files: C:\\Program Files (x86)\\Microsoft SDKs\\UWPNuGetPackages\\runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform\\6.2.2\\runtimes\\win10-x86-aot\\lib\\uap10.0.15138\\System.Runtime.CompilerServices.Unsafe.dll C:\\Users\\JM.nuget\\packages\\system.runtime.compilerservices.unsafe\\4.5.1\\lib\\netstandard2.0\\System.Runtime.CompilerServices.Unsafe.dll源文件:C:\\Program Files (x86)\\Microsoft SDKs\\UWPNuGetPackages\\runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform\\6.2.2\\runtimes\\win10-x86-aot\\lib\\uap10.0.15138\\System .Runtime.CompilerServices.Unsafe.dll C:\\Users\\JM.nuget\\packages\\system.runtime.compilerservices.unsafe\\4.5.1\\lib\\netstandard2.0\\System.Runtime.CompilerServices.Unsafe.dll

Definitely an issue with latest Universal package.绝对是最新通用包的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 WP8 升级到 Silverlight WP8.1,有效负载包含两个或多个目标相同的文件 - Upgrading WP8 to Silverlight WP8.1, payload contains two or more files with same destination Payload包含两个或更多文件 - Payload contains two or more files 如何为具有多个目标文件路径的EXE文件创建安装程序 - How to Create Installer For EXE Files With Multiple Destination Path for files 如何在控制台应用程序中为生产和测试环境设置不同的源和目标路径来复制文件 - how to set different source and destination path to copy files for prod and testing environment in console app 相同路径适用于文件,不适用于文件夹 - Same path works fine with files and does not with folder 如果有效载荷包含意外字段,如何返回BadRequest - How to return BadRequest if payload contains unexpected fields Ajax 请求负载包含意外编码 - Ajax Request Payload contains unexpected encoding 将文件从源替换为目标 - replace files from a source to destination 仅将子文件夹中的文件复制到目标 - Copying only files in subfolders to destination 发布错误:发现多个具有相同相对路径的发布 output 文件 - Publish error: Found multiple publish output files with the same relative path
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM