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

msbuild /t:pack fails to pack an sdk project with a reference to a framework project which contains a PackageReference #5008

Closed
gulbanana opened this issue Apr 11, 2017 · 3 comments
Labels
Functionality:Pack Resolution:ByDesign This issue appears to be ByDesign

Comments

@gulbanana
Copy link

gulbanana commented Apr 11, 2017

This is kind of the opposite of #4532, but still occurs now that #4532 is fixed. Perhaps it's really a build issue, but it manifests as a failure to pack, because the build is done in Visual Studio using the full-framework version of msbuild.

Details about Problem

NuGet product used: dotnet.exe and msbuild (the only ways to pack sdk projects)
NuGet version: 4.0.1
dotnet.exe --version: 1.0.2
msbuild -version: 15.1.1012.6693
OS version: Windows 10

Detailed repro steps so we can see the same problem

  1. Clone https://github.com/gulbanana/repro-packagereference-transitive
  2. cd SdkProject
  3. Either run dotnet msbuild SdkProject.csproj /t:pack, or just dotnet pack.

Verbose Logs

Here is the output: https://pastebin.com/vgCyU7p5

Sample Project

https://github.com/gulbanana/repro-packagereference-transitive

@rohit21agrawal
Copy link
Contributor

can you try restoring and building the project first and then doing dotnet pack --no-build ?

@gulbanana
Copy link
Author

OK, I ran a build in Visual Studio and then dotnet pack --no-build. This created a package.
So the only problem with pack in this scenario is that it tries to perform a build (which can't succeed, since it is using core msbuild).

@mishra14 mishra14 added Functionality:Pack Resolution:External This issue appears to be External to nuget and removed Resolution:External This issue appears to be External to nuget labels Oct 17, 2017
@mishra14
Copy link
Contributor

@gulbanana you should be able to do the following -

msbuild /t:restore .\SdkProject\SdkProject.csproj
msbuild /t:build .\SdkProject\SdkProject.csproj
msbuild /t:pack .\SdkProject\SdkProject.csproj

@mishra14 mishra14 added the Resolution:ByDesign This issue appears to be ByDesign label Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Pack Resolution:ByDesign This issue appears to be ByDesign
Projects
None yet
Development

No branches or pull requests

3 participants