microsoft/slow-cheetah

Fail to publish with NET6 SDK

Dunge opened this issue · 1 comments

Dunge commented

Important part of csproj:

  <ItemGroup>
    <PackageReference Include="Microsoft.VisualStudio.SlowCheetah" Version="3.2.26">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>

  <ItemGroup>
    <None Include="NLog.config">
      <SubType>Designer</SubType>
      <TransformOnBuild>true</TransformOnBuild>
    </None>
    <None Include="NLog.Debug.config">
      <DependentUpon>NLog.config</DependentUpon>
      <IsTransformFile>True</IsTransformFile>
    </None>
    <None Include="NLog.Release.config">
      <DependentUpon>NLog.config</DependentUpon>
      <IsTransformFile>True</IsTransformFile>
    </None>
  </ItemGroup>

Calling:
dotnet publish -c Release Asp.sln

C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: [..]\Asp\NLog.config, [..]\Asp\obj\Release\net5.0\NLog.config.

Was working fine with only NET5 SDK installed.

Relevant change about it: https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/duplicate-files-in-output

How should I fix this?

I have the same problem.