Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to publish with NET6 SDK #232

Open
Dunge opened this issue Oct 21, 2021 · 1 comment
Open

Fail to publish with NET6 SDK #232

Dunge opened this issue Oct 21, 2021 · 1 comment

Comments

@Dunge
Copy link

Dunge commented Oct 21, 2021

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?

@karelkral
Copy link

I have the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants