Payload contains two or more files with the same destination path 'System.Diagnostics.Tools.dll'

前端 未结 7 1495
-上瘾入骨i
-上瘾入骨i 2021-02-12 18:38

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.D         


        
7条回答
  •  春和景丽
    2021-02-12 18:40

    Just in case it may be useful to others encountering the same error - "Payload contains two or more files with the same destination path..." - which can be caused by a variety of reasons related to the labyrinth of NuGet packages, one remedy for such NuGet related errors is clearing the cache, or simply deleting the problematic NuGet package folder: C:\Users\user\.nuget\packages\

    This is based on my own experience of dealing with similar errors including this particular one.

    Edit (2018-07-22): I have been having good luck in dealing with this and similar problems by simply restarting Visual Studio. Probably Microsoft is getting to this bug finally. I get this kind of problems only when building a release version.

提交回复
热议问题