-
Notifications
You must be signed in to change notification settings - Fork 255
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 restore -- ignores packages.config projects silently #4401
Comments
consider warning? |
I am in similar situation - a solution mix with asp.net core and "legacy" non-.net core msbuild projects, both use nuget packages:
Is there ways that I can restore nuget packages for both with a single command line? When I tried using nuget.exe restore (3.3.0.212), it works for the sfproj, but did not restore package for asp.net core project, there is no error message (which I think is what this issue is about). I assume OP (and myself) expects a single command to take care of both projects restore need. Is that possible or realistic? @rrelyea 's command about adding a warning seems to imply that it's not supposed to work? |
NuGet.exe 4.0rc4 will be posted up to nuget.org/downloads very soon. |
Looking at this: https://blogs.msdn.microsoft.com/dotnet/2017/01/30/announcing-net-core-net-native-and-nuget-updates-in-vs-2017-rc/ It says "NuGet – .NET Framework, UWP, .NET Core and other .NET projects can now use PackageReference instead of packages.config for NuGet dependencies." I am now confused on whether the scenario is supported or not. So - is this true that this (PackageReference in legacy MSBuild projects) should work, but mixing RC3 .net core and non-.net core projects seem to have broken it? |
Currently it works using VS2017 13.3 preview, but not using I have a mixed solution where I need to build on a build server without VS installed. So from my perspective it is basically an |
dotnet restore should work fine with any non-packages.config NuGet mechanism: package reference (for both netcore sdk based projects and old style csproj) or project.json (uwp-style). I don't recall why I retitled this bug to say it doesn't work packagereference (for old style csprojs). Today, if you'd like to use a command line restore for a solution that includes packages.config based projects, here are your options:
|
We'd love to hear more comments/feedback on this. However, right now we don't plan to change this behavior, so closing the issue. |
@rrelyea Yeah, it's unfortunate for us this. Even once we have moved all our projects to PackageReference, we will still want our build script to be able to build older changesets so we will have to leave the nuget.exe restore step in rather than being able to switch to the nice msbuild /restore for everything. |
How do you fix this?
|
Note that |
NuGet generates different assets file when running restore through dotnet and visual studio. With dotnet restore, it's missing runtimes section in the assets file.
Repro:
dotnet restore
on this solution through developer command promptError encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled.
Generated assets files are shared at
\\scratch2\scratch\asja\restore issue
The text was updated successfully, but these errors were encountered: