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

Solution based restore does not restore the projects with solution type dependencies #5610

Closed
cdmihai opened this issue Jul 17, 2017 · 3 comments
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue

Comments

@cdmihai
Copy link

cdmihai commented Jul 17, 2017

Please read the following information before posting the issue.

Details about Problem

NuGet product used (dotnet.exe | msbuild /t:restore):

dotnet.exe --version (if appropriate): 1.0.4

msbuild /version: 15.3.402.46929

VS version (if appropriate): 15.0.26709.3000

OS version (i.e. win10 v1607 (14393.321)): Version 10.0.15063 Build 15063

Detailed repro steps so we can see the same problem

  1. Create a solution with two .net core projects (A and B).

  2. Create a solution type dependency between A and B: right click on solution -> "Project Dependencies .." -> make A depend on B
    image

This makes the solution file look something like this:

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A", "A\A.csproj", "{F82B0350-2791-4CF4-A860-1D18876F5B5B}"
	ProjectSection(ProjectDependencies) = postProject
		{FDC88EB1-A799-45EB-86CC-ACA649F31E4B} = {FDC88EB1-A799-45EB-86CC-ACA649F31E4B}
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "B", "B\B.csproj", "{FDC88EB1-A799-45EB-86CC-ACA649F31E4B}"
EndProject
  1. Both A and B restore under VS

  2. In a VS command prompt: msbuild /t:restore SolutionWithProjectDependencies.sln. Both A and B restore

  3. In a VS command prompt: dotnet restore SolutionWithProjectDependencies.sln. Only B restores.

Expected:
Both A and B restore after dotnet restore SolutionWithProjectDependencies.sln.

This causes dotnet build to fail because project A is not restored.
...

Sample Project

SolutionWithProjectDependencies.zip

@cdmihai
Copy link
Author

cdmihai commented Jul 17, 2017

Found this out while looking into dotnet/msbuild#2274. This nuget issue does not appear to be connected to it, since msbuild /t:restore works OK.

@cdmihai
Copy link
Author

cdmihai commented Jul 17, 2017

Appears to work on dotnet 2.0.0-preview3-006770. Feel free to close the issue.

@emgarten
Copy link
Member

Appears to work on dotnet 2.0.0-preview3-006770. Feel free to close the issue.

Thanks for checking, this was fixed in NuGet 4.3.0 which is in 2.0.0 and 1.1.0.

@emgarten emgarten added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants