I have a solution with several MVC6 (asp.net 5) projects. Each project uses bower and npm for packages. Bower has normalize-css and jquery installed.
9 out of 10 times I start the solution, it will crash during one of the mvc project's initialization-phase. If I debug 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 bower dependencies and have only normalize-css left 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 have uninstalled all bower packages and the problem is fixed, but I obviously still need the packages, so when adding jquery or another package again the crashing starts 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"
}
}
If you experience crashes of Visual Studio, typically when working with a very large solution, your IDE might be out of virtual memory. Typical indicators of the problem include a "one or more errors occurred" message, "the process appears to be deadlocked" message, and OutOfMemory exception in a crash dump.
Please open CMD and go to C:\Program Files (x86)\Microsoft Visual Studio\2019\version name\Common7\IDE folder, run the command: devenv /safemode to run your Visual Studio in safe mode. Then, create a new project and check if the installed extensions lead to the problem or not.
ASP.NET Core apps should be designed to process many requests simultaneously. Asynchronous APIs allow a small pool of threads to handle thousands of concurrent requests by not waiting on blocking calls. Rather than waiting on a long-running synchronous task to complete, the thread can work on another request.
Try clean up nuget, npm and bower cache - it's help in my case:
Delete files in your user folder
:
..\.dnx\packages\*
should be restored automatically, but please make backup first,..\.nuget\packages\*
like above, please make backup first,..\AppData\Local\bower\cache\*
..\AppData\Roaming\npm-cache\*
..\AppData\Local\Temp\*
Of course close VS before doing this, and VS restore all packages on first running.
Also you can clean up .vs
folder in your project folder - theoretically it's not related, but from my experience - it's helping with numbers VS issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With