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

Command line restore skips some projects in sln #5214

Closed
AArnott opened this issue May 11, 2017 · 8 comments
Closed

Command line restore skips some projects in sln #5214

AArnott opened this issue May 11, 2017 · 8 comments
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue

Comments

@AArnott
Copy link
Contributor

AArnott commented May 11, 2017

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):

Failure is observed with msbuild /t:restore and dotnet restore

dotnet.exe --version (if appropriate): 2.0.0-preview1-005842

VS version (if appropriate): 15.2.0 and 15.3 (26507.0 d15rel)

OS version (i.e. win10 v1607 (14393.321)): win10 14393.rs1_release_sec.170327-1835

Worked before? If so, with which NuGet version: Unknown.

Detailed repro steps so we can see the same problem

git clone https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/DevCore
cd devcore
cd src\clr
msbuild /t:restore

Observe how the build output omits mention of TestClient and UnitTests projects. These restore perfectly if I restore them directly. But the solution build fails after restoring packages for the solution unless I do them manually. The projects are in the solution, so I fully expect package restore at the solution level to apply to them as well.

Other suggested things

Verbose Logs

--verbosity diag
C:\Program Files\dotnet\sdk\2.0.0-preview1-005842\MSBuild.dll /NoLogo /ConsoleLoggerParameters:Verbosity=Minimal /Logger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\2.0.0-preview1-005842\dotnet.dll /m /t:Restore /v:m /verbosity:diag .\Microsoft.ServiceHub.sln
  Restoring packages for F:\git\DevCore\src\clr\hosts\ServiceHub.Host.CLR.x86\ServiceHub.Host.CLR.x86.csproj...
  Restoring packages for F:\git\DevCore\src\clr\hosts\Microsoft.ServiceHub.HostLib\Microsoft.ServiceHub.HostLib.csproj...
  Restoring packages for F:\git\DevCore\src\clr\Microsoft.ServiceHub.Client\Microsoft.ServiceHub.Client.csproj...
  Restoring packages for F:\git\DevCore\src\clr\hosts\ServiceHub.Host.CLR.x64\ServiceHub.Host.CLR.x64.csproj...
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\Microsoft.ServiceHub.HostLib\project.assets.json
  Restore completed in 687.11 ms for F:\git\DevCore\src\clr\hosts\Microsoft.ServiceHub.HostLib\Microsoft.ServiceHub.HostLib.csproj.
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\Microsoft.ServiceHub.Client\project.assets.json
  Restore completed in 651.7 ms for F:\git\DevCore\src\clr\Microsoft.ServiceHub.Client\Microsoft.ServiceHub.Client.csproj.
  Restoring packages for F:\git\DevCore\src\clr\samples\ServiceHub.Sample.VsixClient\ServiceHub.Sample.VsixClient.csproj...
  Restoring packages for F:\git\DevCore\src\clr\hosts\ServiceHub.Host.CLR\ServiceHub.Host.CLR.csproj...
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\ServiceHub.Sample.VsixClient\project.assets.json
  Restore completed in 100.27 ms for F:\git\DevCore\src\clr\samples\ServiceHub.Sample.VsixClient\ServiceHub.Sample.VsixClient.csproj.
  Restoring packages for F:\git\DevCore\src\clr\samples\ServiceHub.Sample.VsixService\ServiceHub.Sample.VsixService.csproj...
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\ServiceHub.Sample.VsixService\project.assets.json
  Restore completed in 26.52 ms for F:\git\DevCore\src\clr\samples\ServiceHub.Sample.VsixService\ServiceHub.Sample.VsixService.csproj.
  Restoring packages for F:\git\DevCore\src\clr\services\ServiceHubVsixServiceDiscovery\Microsoft.ServiceHub.VsixServiceDiscovery.csproj...
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\Microsoft.ServiceHub.VsixServiceDiscovery\project.assets.json
  Restore completed in 75.29 ms for F:\git\DevCore\src\clr\services\ServiceHubVsixServiceDiscovery\Microsoft.ServiceHub.VsixServiceDiscovery.csproj.
  Restoring packages for F:\git\DevCore\src\clr\tests\ShutdownTestClient\ShutdownTestClient.csproj...
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\ShutdownTestClient\project.assets.json
  Restore completed in 45.23 ms for F:\git\DevCore\src\clr\tests\ShutdownTestClient\ShutdownTestClient.csproj.
  Restoring packages for F:\git\DevCore\src\clr\tests\TestService1\TestService1.csproj...
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\TestService1\project.assets.json
  Restore completed in 27.79 ms for F:\git\DevCore\src\clr\tests\TestService1\TestService1.csproj.
  Restoring packages for F:\git\DevCore\src\clr\tests\TestService\TestService.csproj...
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\ServiceHub.Host.CLR.x86\project.assets.json
  Restore completed in 1.4 sec for F:\git\DevCore\src\clr\hosts\ServiceHub.Host.CLR.x86\ServiceHub.Host.CLR.x86.csproj.
  Restoring packages for F:\git\DevCore\src\installers\NodeModules\NodeModules.csproj...
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\NodeModules\project.assets.json
  Restore completed in 9.97 ms for F:\git\DevCore\src\installers\NodeModules\NodeModules.csproj.
  Restoring packages for F:\git\DevCore\src\installers\SwrGenerator\SwrGenerator.csproj...
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\SwrGenerator\project.assets.json
  Restore completed in 2.04 ms for F:\git\DevCore\src\installers\SwrGenerator\SwrGenerator.csproj.
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\TestService\project.assets.json
  Restore completed in 589.61 ms for F:\git\DevCore\src\clr\tests\TestService\TestService.csproj.
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\ServiceHub.Host.CLR.x64\project.assets.json
  Restore completed in 2.07 sec for F:\git\DevCore\src\clr\hosts\ServiceHub.Host.CLR.x64\ServiceHub.Host.CLR.x64.csproj.
  Lock file has not changed. Skipping lock file write. Path: F:\git\DevCore\obj\ServiceHub.Host.CLR\project.assets.json
  Restore completed in 1.55 sec for F:\git\DevCore\src\clr\hosts\ServiceHub.Host.CLR\ServiceHub.Host.CLR.csproj.
  
  NuGet Config files used:
      F:\git\DevCore\src\clr\NuGet.Config
      F:\git\DevCore\NuGet.Config
      C:\Users\andarno\AppData\Roaming\NuGet\NuGet.Config
      C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
  
  Feeds used:
      https://api.nuget.org/v3/index.json
      https://www.myget.org/F/aarnott/api/v3/index.json
      https://www.myget.org/F/vs-devcore/api/v3/index.json
      https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/VS/nuget/v3/index.json
      https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/VSIDE-RealSigned-Release/nuget/v3/index.json
      https://mseng.pkgs.visualstudio.com/_packaging/VS-PrivateAssemblies/nuget/v3/index.json
      https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/VSIDE-CI/nuget/v3/index.json
      https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json
      C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
@emgarten
Copy link
Member

@AArnott are you using project build ordering in this solution? Is there anything unique about how these projects are referenced?

@AArnott
Copy link
Contributor Author

AArnott commented May 11, 2017

Great question. Yes, in fact the same two projects that are skipped in package restore are the two that have sln-expressed project dependencies on other projects.

@emgarten
Copy link
Member

In that case this might be caused by #4578

@AArnott
Copy link
Contributor Author

AArnott commented May 12, 2017

I agree. But that issue seems to be closed. Does that mean it wasn't fixed, or simply that 15.3 Preview 1 doesn't include the fix?

@emgarten
Copy link
Member

Looks like the fix would be in Preview 2.

15.3 Preview 1 has NuGet 4.3.0.2418 which was right before the fix went in.

@emgarten emgarten added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label May 12, 2017
@emgarten
Copy link
Member

I'm going to close this as a dupe of the original issue. Let me know if you see any problems with this in Preview 2.

@forrestab
Copy link

@emgarten, sorry this may be me being dense, but with so many versions to keep up with, do you mean dotnet core 2 preview 2?

@emgarten
Copy link
Member

emgarten commented Jul 19, 2017

@forrestab yes, dotnet CLI 2.0.0-preview2

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

3 participants