2

I want to restore from a local folder. I tried

dotnet restore --configfile NuGet.config 

(with configuration local folder), but it still download to C:/Windows10/User/Me/.nuget/packages.

1 Answer 1

1

You are misunderstanding what is Package Restore Feed and Package Folder. From NuGet Package Restore doc:

Package Restore feature will install all referenced packages before a project is built, thereby ensuring that all dependencies are available to a project without requiring them to be stored in source control ... Packages are put into a packages folder.

When you add the local source, you only specify the additional package feed for package restoring. If you want to modify Package Folder, you may modify repositoryPath in Nuget.config:

Allows you to install the NuGet packages in the specified folder, instead of the default "$(Solutiondir)\Packages" folder.

<settings>
    <repositoryPath> specify_here_your_local_path </repositoryPath>
</settings>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.