Reputation: 14426
I checked in my new vNext project into TFS at home and it was working fine.
I then went to work (corporate environment with proxy etc) and get latest. It pulled my project down and i fired up the solution.
I do a build and it's failing. The reason being that it is not restoring my nuget packages.
I have tried editing the project.json file and it says that restore is successful upon save, it is not.
I have tried getting new nuget packages, it says success and adds the reference but it says it is missing (exclamation mark).
I have tried running VS 2015 as admin.
I have tried manually creating the ..users/me/.kpm/packages folder. (this is where i believe the packages download to)
I have tried a different proxy.
I can view the packages in nuget fine, I also get the nice intellisense in the .json file too. This makes me think it's not a proxy issue.
None of these things have worked. Any other ideas?
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"exclude": [
"wwwroot"
],
"packExclude": [
"node_modules",
"bower_components",
"**.kproj",
"**.user",
"**.vspscc"
],
"dependencies": {
"Microsoft.AspNet.Server.IIS": "1.0.0-beta2",
"Microsoft.AspNet.Mvc": "6.0.0.0-beta2"
},
"frameworks": {
"aspnet50": { },
"aspnetcore50": { }
}
}
Upvotes: 2
Views: 2529
Reputation: 1
I´m developing with beta8, and I had to jump a few times between beta versions and the best solutions that works for me was to add new feeds for VNext packages:
After updating the new feeds, I open and save my project file “project.json” and the references updates itself.
Take a look the next article if you need to know how to add this new feed on your Windows or *Nix machines: https://github.com/aspnet/Home/wiki/Configuring-the-feed-used-by-dnu-to-restore-packages
A very useful although general article about how dnx project in: http://docs.asp.net/en/latest/dnx/projects.html
Upvotes: 0
Reputation: 434
I got a similar problem while restoring packages when there was an unreachable server address in my nuget package sources. In that case unchecking the unreachable server in my package sources did the trick.
This behavior seems like a bug to me. It keeps failing on the one unreachable server and fails to try and restore the packages with the other, official nuget server. This also results in a failing restore of bower packages.
Upvotes: 0
Reputation: 14426
Okay i got it working, many thanks to @Victor Hurdugaci for helping me out.
Steps for me to fix this were as follows:-
C:\Users\MyUser\.kre\packages\KRE-CLR-x86.1.0.0-beta2\bin
(you might want to check your project properties to see which version you need, im not sure it matters)cd
to your project folder (the location of your project.json) kpm restore -p http:yourproxyurl:1234
(where yourproxyurl
is your proxy address and 1234
is your port)At this point it did loads of downloading goodness into C:\Users\MyUser\.kpm\packages
I went back into Visual studio and did a build, it was still failing.
As a final step I had to open the project.json
file and simply save it without even making any changes. At this point my references updated and all was good, it would then build successfully.
Upvotes: 3