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

Invalid Nuget.Build.Tasks.Console package when building from source #9705

Closed
dseefeld opened this issue Jun 22, 2020 · 5 comments
Closed

Invalid Nuget.Build.Tasks.Console package when building from source #9705

dseefeld opened this issue Jun 22, 2020 · 5 comments
Assignees
Labels
Priority:2 Issues for the current backlog. Type:Bug Type:Engineering product/infrastructure work/not a customer bug/feature/DCR

Comments

@dseefeld
Copy link

Details about Problem

Building Nuget.Build.Tasks.Console in source-build results in invalid contentFiles in the generated package. Trailing backslashes in the PackagePath on the two lines linked below cause a double slash in the output package. Related to #7004

https://github.com/NuGet/NuGet.Client/blob/784274cc9b2002ca73055e8134064261118d8a01/src/NuGet.Core/NuGet.Build.Tasks.Console/NuGet.Build.Tasks.Console.csproj#L67-L68

dotnet.exe --version (if appropriate): 5.0.100-preview.4.20258.7
OS version (i.e. win10 v1607 (14393.321)): CentOS Linux 8 (Core)

Worked before? Not sure

Detailed repro steps so we can see the same problem

  1. Build Nuget.Build.Tasks.Console on a non-windows OS

  2. Inspect the resulting nuspec in Nuget.Build.Tasks.Console.*.nupkg (Note the double slash in contentFiles entries)

@rrelyea
Copy link
Contributor

rrelyea commented Jun 22, 2020

@dominoFire
cc @jeffkl @nkolev92

@nkolev92 nkolev92 added Type:Engineering product/infrastructure work/not a customer bug/feature/DCR Type:Bug Priority:2 Issues for the current backlog. labels Jun 29, 2020
@nkolev92 nkolev92 added this to the Sprint 173 - 2020.07.24 milestone Jun 29, 2020
@nkolev92
Copy link
Member

nkolev92 commented Jun 29, 2020

I imagine the problem is not normalizing the slashes before appending the trailing slash.

We should #7004, but I imagine removing the trailing slash would work just fine for this scenario.

@dseefeld Do you know if there are any consumption problems with the built nupkg?
What is the impact of this?

@dominoFire
Copy link
Contributor

@nkolev92 dotnet/source-build is impacted by this bug. The source-build'ed nuget packages created and consumed in source-build have this problem.

There's a patch that address this issue in source-build. Also, a PR in NuGet.Client is ready to address this specific package. NuGet/NuGet.Client#3511

@aortiz-msft
Copy link
Contributor

@dominoFire NuGet/NuGet.Client#3511 is merged. Can we close this issue or is there additional work left?

@dominoFire
Copy link
Contributor

I can confirm that there are no more extra slashes in the latest dev branch.

Before:

   <contentFiles>
      <files include="any/net472//NuGet.Build.Tasks.Console.exe" buildAction="None" copyToOutput="true" />
      <files include="any/netcoreapp2.1//NuGet.Build.Tasks.Console.dll" buildAction="None" copyToOutput="true" />
      <files include="any/netcoreapp2.1//NuGet.Build.Tasks.Console.runtimeconfig.json" buildAction="None" copyToOutput="true" />
    </contentFiles>

After:

    <contentFiles>
      <files include="any/netcoreapp2.1/NuGet.Build.Tasks.Console.dll" buildAction="None" copyToOutput="true" />
      <files include="any/netcoreapp2.1/NuGet.Build.Tasks.Console.runtimeconfig.json" buildAction="None" copyToOutput="true" />
    </contentFiles>

I will close the for now. If you need more heelp, feel free to reach to us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:2 Issues for the current backlog. Type:Bug Type:Engineering product/infrastructure work/not a customer bug/feature/DCR
Projects
None yet
Development

No branches or pull requests

5 participants