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

Tool pack outputs to aliased path in nupkg #13843

Closed
zkat opened this issue Sep 25, 2020 · 1 comment
Closed

Tool pack outputs to aliased path in nupkg #13843

zkat opened this issue Sep 25, 2020 · 1 comment

Comments

@zkat
Copy link

zkat commented Sep 25, 2020

When packing a tool that uses NuGet aliases, the nupkg itself should put its output files under the concrete framework shortname, rather than the alias. This was fixed in other NuGet packaging scenarios for NuGet/Home#10020, but packing tool projects is still affected, and I'm told this is not under NuGet's control, so I'm filing a bug here.

Repro

  1. dotnet new console -n baz
  2. cd baz
  3. Replace .csproj contents with the text below
  4. dotnet pack
  5. extract the .nupkg in the nupkg dir
  6. look in the tools directory

csproj

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net50-windows</TargetFramework>
    <PackAsTool>true</PackAsTool>
    <ToolCommandName>hello</ToolCommandName>
    <PackageOutputPath>./nupkg</PackageOutputPath>
  </PropertyGroup>
</Project>

Expected

tools/net5.0-windows7.0/any/...

Actual

tools/net50-windows/any/...

Sample project

You can just extract this one and run dotnet pack on it.

baz.zip

@wli3 wli3 mentioned this issue Sep 29, 2020
5 tasks
@wli3
Copy link

wli3 commented Oct 6, 2020

#13924

@wli3 wli3 closed this as completed Oct 6, 2020
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