[dotnet-cache]: Cache command does not use NuGet.config from the packages.xml directory
See original GitHub issue- Create a directory with packages.xml + NuGet.config that points to custom feeds (in this case the
dotnet-core
feed) - Run
dotnet cache --entries packages.xml --framework netcoreapp2.0 --runtime win7-x64 /p:FX_VERSION=2.0.0-*
(using /p:FX_VERSION since --fx-version doesn’t exist as yet).
Expected: The 2.0.0-* package is resolved and restored from the dotnet-core feed.
Actual:
_RestoreCrossgen
fails to find the package.
The issue is that the generated project is written and restored from to a temp directory and doesn’t know about the NuGet.config in the PWD.
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Managing the global packages, cache, and temp folders
When asked to retrieve a package, NuGet first looks in the global-packages folder. If the exact version of package is not there, then...
Read more >c# - Change nuget packages folder and use another ...
Change nuget packages folder and use another NuGet.Config in Visual Studio ... I want to change nuget package folder but it doesn't work....
Read more >Dotnet restore does not honour nuget.config 'repositoryPath'
I understand that the packages path can be passed as an argument to the dotnet restore command, however this only works at the...
Read more >How to clear NuGet cache?
Open Visual Studio, go to Tools -> NuGet Package Manager -> Package Manager Settings menu. · Click Clear All NuGet Cache(s) button in...
Read more >NuGet packages in the Package Registry
Project-level: Use when you have few NuGet packages and they are not in the same GitLab ... If you encounter issues, clear the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@gkhanna79 the simpler solution would be to generate the project file and restore it in the working directory (rather than in a temp dir). I don’t think users of the tool would particularly mind if running the tool produced intermediate artifacts.
The obj folder. It’s still sort of polluting the working dir, but it’s easily remedied by a
.gitignore
.