papyruscs
papyruscs copied to clipboard
Compilation error due to multiple publish output files with same relative path
I'm getting a compilation error during the build due to two assemblies appear in two separate locations:
- papyruscs\leveldb-sharp-std\LevelDB.dll
- papyruscs\Maploader\LevelDB.dll
- papyruscs\leveldb-sharp-std\zlibwapi.dll
- papyruscs\Maploader\zlibwapi.dll
Any suggestion on why this is occurring and how to resolve? Thanks
I was able to build using.NET Core 3.1 https://dotnet.microsoft.com/en-us/download/dotnet/3.1
Could it be an incompatibility with version 6?
Just ran into this issue myself:
/usr/share/dotnet/sdk/6.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: /home/user/Desktop/Minecraft/papyruscs/leveldb-sharp-std/LevelDB.dll, /home/user/Desktop/Minecraft/papyruscs/Maploader/LevelDB.dll, /home/user/Desktop/Minecraft/papyruscs/leveldb-sharp-std/zlibwapi.dll, /home/user/Desktop/Minecraft/papyruscs/Maploader/zlibwapi.dll. [/home/user/Desktop/Minecraft/papyruscs/PapyrusCs/PapyrusCs.csproj]
Apparently it's because of a fix in SKD version 6 described here: https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/duplicate-files-in-output
I managed to get it to compile by adding this inside the Project tag toward the end in PapyrusCs/PapyrusCs.csproj:
<PropertyGroup> <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles> </PropertyGroup>
Full disclosure: I have no idea whether this is a wise or even sane thing to do as it doesn't fix the issue, it only reverts the previous SDK behaviour.