ASP.NET 5 Saves VS Crash on Project Initialization

I have a solution with several MVC6 (asp.net 5) projects. Each project uses conversation and npm for packages. Bower has normalize-css and jquery.

9 out of 10 times. I run the solution, it crashes during one of the phases of the mvc project initialization. If I debug an error, I get the following error.

An unhandled exception of type 'Newtonsoft.Json.JsonSerializationException' occurred in mscorlib.dll Additional information: Unexpected end when deserializing object. Path 'dependencies.jquery.pkgMeta.devDependencies', line 43, position 1. 

If I remove jquery from the bauer dependencies and leave only normalize-css, I get:

 An unhandled exception of type 'Newtonsoft.Json.JsonSerializationException' occurred in mscorlib.dll Additional information: Unexpected end when deserializing object. Path 'dependencies.normalize-css.pkgMeta._release', line 39, position 1. 

I removed all the bower packages and the problem is fixed, but I obviously still need the packages, so adding jquery or another package fails again.

I am using Visual Studio 2015 Enterprise.

edit for bower.json:

  { "name": "ASP.NET", "private": true, "dependencies": { "jquery": "2.1.4", "normalize-css": "3.0.3" } } 
+7
visual-studio bower asp.net-mvc
source share
2 answers

It seems to fix another mistake, see my answer here: fooobar.com/questions/835072 / ... worked wonders for the crash. He did not crash, because if I remember correctly. In any case, the combination of updating all dlls (especially newtonsoft.json, including removing old versions from disk) and going through the steps suggested by @LukaszDev definitely made a big difference.

0
source share

Try to clear nuget, npm and bower cache - this will help in my case:

Delete files in your user folder :

  • ..\.dnx\packages\* should be restored automatically, but first make a backup,
  • ..\.nuget\packages\* , as described above, back up first,
  • ..\AppData\Local\bower\cache\*
  • ..\AppData\Roaming\npm-cache\*
  • ..\AppData\Local\Temp\*

Of course, close VS before doing this, and VS will restore all packages on first start.

You can also clear the .vs folder in the project folder - theoretically this is not related, but from my experience - this helps with problems with VS numbers.

+1
source share

All Articles