0

I am trying to run my UWP app on Windows-10 with Visual Studio 2015. The issue is, VS-2015 doesnt seem to generate this hidden file project.lock.json
Since this file is not generated, I hit this error: Nuget Errors

The workaround which I am using is to create an new empty project and copy the two json files to your existing project.


This is my VS-2015 details:

MS VS Professional 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01038

Community
  • 1
  • 1
Ganesh kudva
  • 990
  • 3
  • 13
  • 34
  • Can you check your setting to see if downloading packages is enabled? What do you mean by copying the *two* json files? project.json should be there already, and only project.lock.json is generated. – Yishai Galatzer Jun 20 '16 at 23:55
  • Hi @YishaiGalatzer, Thanks for the response. Yes the **project.json** is already available. I just copy both the files (project.json & project.lock.json) from the empty project. How to check if _**downloading packages**_ is enabled or not ? – Ganesh kudva Jun 21 '16 at 02:21
  • Did you try to restore packages? – svick Jun 21 '16 at 11:09
  • Hi @svick,Thx for the response. I was not sure how to _restore packages_ in VS-2015. I found these two SO links : [Link-1](http://stackoverflow.com/questions/28131095/how-to-enable-nugets-package-restore-in-visual-studio-2015) & [Link-2](http://stackoverflow.com/questions/27895504/how-do-i-enable-nuget-package-restore-in-visual-studio-2015) Based on the answers available on the above mentioned threads, I enabled the checkbox under **Tools > Options > NuGet Package Manager > Package Sources** Still it doesnt seem to resolve my issue. Kindly let me know, in case if I missed anything. – Ganesh kudva Jun 21 '16 at 17:09
  • 1
    Right click on the project in Solution Explorer and select Restore Packages. – svick Jun 21 '16 at 17:22
  • Can you share both your project.json and the actual errors you are getting. – Yishai Galatzer Jun 22 '16 at 04:15
  • Hi @svick, Thanks for the response. restoring packages seems to do the trick. After I restore package, I see the **project.lock.json** file & solve my issue. The problem, now though, is that everytime I open my solution/project I need to restore packages. Is there a way to configure VS such that it automatically does this everytime whenever I open the project? – Ganesh kudva Jun 22 '16 at 16:55

1 Answers1

0

The solution is to Right click on the project in Solution Explorer and select Restore Packages

Thanks @svick for the solution

Ganesh kudva
  • 990
  • 3
  • 13
  • 34