本文介绍了有效负载包含两个或多个具有相同目标路径“System.Diagnostics.Tools.dll"的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 Nuget 添加 2 个库到我的项目后,我收到以下错误:

After I add 2 libraries from Nuget to my project I receive follow error:

Error       Payload contains two or more files with the same destination path 'System.Diagnostics.Tools.dll'. Source files: 
C:UsersHorcrux7.nugetpackages
untime.any.System.Diagnostics.Tools4.0.1lib
etcore50System.Diagnostics.Tools.dll
C:UsersHorcrux7.nugetpackagesSystem.Diagnostics.Tools4.0.0lib
etcore50System.Diagnostics.Tools.dll App1            

如何解决这个版本冲突?

How can I solve this version conflict?

我只有一个非常小的 UWP 项目.

I have only a very small single UWP project.

推荐答案

问题已自行解决.更新到最新版本的 Microsoft.NETCore.UniversalWindowsPlatform 已经解决了这个问题.

The problem has solve it self. An update to the latest version of Microsoft.NETCore.UniversalWindowsPlatform has solved it.

看起来库 A 是针对版本 5.1.0 编译的,库 B 是针对版本 5.2.2 编译的.因为我的项目是 5.1.0 版本,所以出现了冲突情况.不明白为什么我切换UWP版本没有冲突.

It look like that library A was compiled against version 5.1.0 and library B was compiled against version 5.2.2. Because my project was on version 5.1.0 there was a conflict situation. I does not understand why I have no conflict if I switch the UWP version.

如果我将库 B 与旧的 UWP 版本一起使用,也不会有冲突.

If I use the library B with the old UWP version there was also no conflict.

这篇关于有效负载包含两个或多个具有相同目标路径“System.Diagnostics.Tools.dll"的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 11:58