Error NETSDK1152

Hi, I am now getting this error below after Installed Visual Studio 2022 when trying to deploy my project. Any idea how to fix this?
"dotnet: C:\Program Files\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: C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\BlazorWasm.web.config,"


Check this thread:

Thanks!.. add this into .csproj within <PropertyGroup> tag work.

I just came across a similar issue in publishing a .NET 5 WASM on Azure DevOps. VS2022 and Azure DevOPs use the latest .NET version as seen in the sdk path in the error. Just setting the .NET version in the yaml worked for me. No need to ignore the checks if using version 5.

- task: UseDotNet@2
  displayName: 'Use dotnet 5'
    version: '5.0.x'

I hope this helps someone.