ligershark/side-waffle

VS2015 Update 2 Crashes When Creating ASP.NET Core Project

RehanSaeed opened this issue · 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?

Can you get a full call stack?

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?

@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.

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

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 were you able to find a solution to your problem?