2023-02-03T15:48:33.0173442Z C:\Program Files\dotnet\sdk\6.0.405\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: D:\a\1\s\src\PartsUnlimited.Models\config.json, D:\a\1\s\src\PartsUnlimitedWebsite\config.json. [D:\a\1\s\src\PartsUnlimitedWebsite\PartsUnlimitedWebsite.csproj]
2023-02-03T15:48:33.0778598Z ##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
I got this error in the CI pipeline:
2023-02-03T15:48:33.0173442Z C:\Program Files\dotnet\sdk\6.0.405\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: D:\a\1\s\src\PartsUnlimited.Models\config.json, D:\a\1\s\src\PartsUnlimitedWebsite\config.json. [D:\a\1\s\src\PartsUnlimitedWebsite\PartsUnlimitedWebsite.csproj] 2023-02-03T15:48:33.0778598Z ##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
This link helped fix the error and the pipeline was successful https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#erroronduplicatepublishoutputfiles and https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/duplicate-files-in-output.
By adding the below the following build property to src\PartsUnlimitedWebsite\PartsUnlimitedWebsite.csproj