Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the default output folder for dotnet restore?

Tags:

I tried to create a simple .net core using commandline

dotnew new 

in a certain folder called netcoreExample and I could see that there are two files created which are program.cs and project.json. Then I add Microsoft.EntityFrameworkCore to dependencies entry in project.json

When I try to run the command

dotnet restore 

it shows the package is restores successfully. However, when I inspect the folder where I run dotnet restore from, I didn't see the "packages" folder which is usually created when with the old C# projects running Nuget restore.

I wonder where the dotnet restore output all of the dependencies to.

like image 789
LxL Avatar asked Jul 13 '16 15:07

LxL


People also ask

Is dotnet restore necessary?

In most cases, you don't need to explicitly use the dotnet restore command, since a NuGet restore is run implicitly if necessary when you run the following commands: dotnet new. dotnet build. dotnet build-server.

What is dotnet tool restore?

The dotnet tool restore command finds the tool manifest file that is in scope for the current directory and installs the tools that are listed in it. For information about manifest files, see Install a local tool and Invoke a local tool.

Does dotnet build include Restore?

You don't have to run dotnet restore because it's run implicitly by all commands that require a restore to occur, such as dotnet new , dotnet build , dotnet run , dotnet test , dotnet publish , and dotnet pack . To disable implicit restore, use the --no-restore option.


1 Answers

On Windows by default its %userprofile%\.nuget\packages. I wish dotnet restore -verbosity <verbosity-level> printed out where it was restoring to.

On other OSes its like <HOME-environment-variable-location>/.nuget/packages

like image 124
Kiran Avatar answered Sep 16 '22 16:09

Kiran