question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[dotnet-cache]: Cache command does not use NuGet.config from the packages.xml directory

See original GitHub issue
  1. Create a directory with packages.xml + NuGet.config that points to custom feeds (in this case the dotnet-core feed)
  2. 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:closed
  • Created 7 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
pranavkmcommented, Mar 29, 2017

@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.

0reactions
pranavkmcommented, Mar 29, 2017

The obj folder. It’s still sort of polluting the working dir, but it’s easily remedied by a .gitignore.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found