side-waffle icon indicating copy to clipboard operation
side-waffle copied to clipboard

VS2015 Update 2 Crashes When Creating ASP.NET Core Project

Open RehanSaeed opened this issue 9 years ago • 7 comments

My ASP.NET MVC Boilerplate project template has started causing VS2015 Update 2 to crash out. The project gets created but during the package restore phase it crashes out. I debugged Visual Studio and found that it was throwing the following exception:

System.ObjectDisposedException was unhandled Message: An unhandled exception of type 'System.ObjectDisposedException' occurred in mscorlib.dll Additional information: Cannot access a disposed object.

@sayedihashimi Did anything change in Update 2 that could have caused this problem? Are there any workarounds?

RehanSaeed avatar Apr 10 '16 09:04 RehanSaeed

Can you get a full call stack?

sayedihashimi avatar Apr 11 '16 01:04 sayedihashimi

That's all I got when debugging my experimental instance of VS with the extension. Any good resources on how to get a crash dump from VS?

RehanSaeed avatar Apr 13 '16 10:04 RehanSaeed

@RehanSaeed Here's some info on collecting a crash dump.

codewithtyler avatar May 07 '16 17:05 codewithtyler

@RandomlyKnighted Thanks for that.

You can find the crash dump here. It was quite large, so I 7-zipped it up.

The crash is a bit random, it occurred the second time I created a new project using my ASP.Net Core template. I suspect it is something to do with VS downloading packages and then my feature selection wizard modifying the package.json, project.json and bower.json files so that VS gets it's state corrupted or it has to start again.

RehanSaeed avatar May 11 '16 16:05 RehanSaeed

There is some JSON serialization exception happening. Do you have any invalid JSON files (any files with comments)

-       $exception  {"Unexpected end when deserializing object. Path 'dependencies.chai', line 44, position 1."}    Newtonsoft.Json.JsonSerializationException

sayedihashimi avatar May 11 '16 16:05 sayedihashimi

Yes, my template starts with code like this with comments in it:

{
  "version": "1.0.0-*",
  "dependencies": {
    // $Start-Glimpse$
    "Glimpse": "2.0.0-beta1",
    // $End-Glimpse$
    "Microsoft.AspNet.Mvc": "6.0.0-rc1-final"
    ...
}

If the developer enables the feature, I I remove the comments or if they disabled the feature, I remove the line between the comments, as well as the comments themselves. Is there some workaround I could use or will this problem be fixed in RC2?

RehanSaeed avatar May 12 '16 08:05 RehanSaeed

@RehanSaeed were you able to find a solution to your problem?

codewithtyler avatar Nov 09 '16 02:11 codewithtyler