nugetdnudnvm

Nuget config and dnu restore on fresh windows install


After getting a new server up and running, I tried to get a dnx project working. I ran dnu restore on a project, and get this error.

Errors in C:\apps\ElasticIndexer\app\project.json Unable to locate Dependency TestApplication >= 1.0.1

Feeds used: https://api.nuget.org/v3-flatcontainer/

My issue is that I am unable to change the nuget feed used, as we host our nuget packages on a different server. I searched in %appdata% and there was no folder for nuget. I then decided I would do a search for nuget.config on the whole server and there was no nuget.config file.

I don't want to install Visual Studio on this server, but is there a reason why I don't have a nuget folder in my %appdata% folder? How does dnu know to search api.nuget.org by default? When installing latest dnvm is it supposed to create the nuget location as well, or do I need to manually create the folder and config file?


Solution

  • If there isn't a nuget.config file on your server you could try running nuget install. If that doesn't work try updating the sources via the command line:

    NuGet.exe Sources Add -Name <feedName> -Source <pathToPackageSource>