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

dotnet pack --include-symbols fails #2661

Closed
magne opened this issue Aug 25, 2017 · 4 comments
Closed

dotnet pack --include-symbols fails #2661

magne opened this issue Aug 25, 2017 · 4 comments

Comments

@magne
Copy link
Contributor

magne commented Aug 25, 2017

Description

When packing a .NET Core project with dotnet pack --include-symbols will fail rather than producing two NuGet packages.

The reason the build will fail is that the command "...\.paket\paket.exe" fix-nuspecs files "obj\TestProj.1.0.0.nuspec;obj\TestProj.1.0.0.symbols.nuspec" references-file "D:\test\src\TestProj/obj/TestProj.csproj.references" fails. This in turn causes .paket\Paket.Restore.targets to fail on line 87.

The root cause is that paket fix-nuspecs ... does not seem to split the files argument into a list with two entries, but rather tries to process the entire argument as a list with one entry.

Repro steps

Given the following .Net Core .csproj file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net461</TargetFramework>
  </PropertyGroup>
  <Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>

paket.dependencies:

source https://api.nuget.org/v3/index.json

nuget NUnit

and paket.references:

NUnit

When running

dotnet pack --include-symbols

the build will produce an error.

...> dotnet --info
.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.0\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

...> .paket\paket.exe --version
Paket version 5.89.2

Expected behavior

The build should produce a NuGet package with the TestProj.dll assembly, and a NuGet package with the symbols.

Actual behavior

The build fails with the following error:

Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  TestProj -> ...\src\TestProj\bin\Debug\net461\TestProj.dll
  Paket version 5.89.2
  Performance:
   - Runtime: 655 milliseconds
  Paket failed with
  -> Specified file 'obj\TestProj.1.0.0.nuspec;obj\TestProj.1.0.0.symbols.nuspec' does not exist.
D:\test\.paket\Paket.Restore.targets(87,5): error MSB3073: The command ""D:\test\.paket\paket.exe" fix-nuspecs files "obj\TestProj.1.0.0.nuspec;obj\TestProj.1.0.0.symbols.nuspec" references-file "D:\test\src\TestProj/obj/TestProj.csproj.references" " exited with code 1. [D:\test\src\TestProj\TestProj.csproj]

Known workarounds

None.

I have tried to vary the files argument to make paket parse it as two separate files, but no success.

@forki
Copy link
Member

forki commented Aug 25, 2017 via email

@magne
Copy link
Contributor Author

magne commented Aug 25, 2017

No, sorry. I've tried to find a way to fix it, but I have no idea of how Argu is supposed to parse a list of arguments. I've tried to change the delimiter, change quoting etc., but have found no way to make the files argument into a list with more than one entry.

The funny thing is that this worked a couple of days ago, but I can't seem to find any commit that should have changed this behavior.

@forki
Copy link
Member

forki commented Aug 25, 2017

any chance you can upload the repro as zip?
would make it easier for me.

@forki
Copy link
Member

forki commented Aug 25, 2017

ok never mind. fix is under way.
please retry with 5.89.4

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