Tooling: Visual Studio 2015 hangs trying to access project.json after beta 8 upgrade

Created on 19 Oct 2015  Â·  42Comments  Â·  Source: aspnet/Tooling

I've upgraded .net and tooling to beta 8. I'm trying to upgrade my project.json file to use beta 8.

However everytime I try and click on the file all of visual studio 2015 hangs and becomes unresponsive

Any ideas how I can fix it ?

thanks

All 42 comments

Hi @vinnytheviking, sorry to hear you are running into this. I'm not sure what is happening here.

One question, do you get the same result when you create a new project in VS?

Here are a few things to try.

Clear ComponentModelCache folder

  1. Close all instances of VS
  2. Delete the folder at %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
  3. Restart VS

If that doesn't work then you can try.

Delete packages folder

  1. Close all instances of VS
  2. Delete the folder at %userprofile%\.dnx\packages
  3. Restart VS
  4. If package restore doesn't start automatically start that by Right Clicking on the project in VS and selecting restore packages

If those don't help let me know and we can figure out some other things to try.

Hi,

I've tried both suggestions and I'm still getting the issue.

Vinny

@billhiebert any ideas?

Sounds like a bad install to me. Maybe mismatched components. Have you tried uninstalling beta8 and re-installing it

I will try this tomorrow night. I'm at angular connect conference the next 2 days so can only try at night.

It may fix my other issues with beta 8 as well. So far I've not had a very successful time with it. I've spent 8 hours so far trying to upgrade with no luck.

I'll keep you guys posted.

Thanks for all the help so far.

Vinny

I'm getting this with a clean VS2015 install and Beta 8 installed only (not Beta 7 tooling installed) but the project used to be a Beta 7 project. Not sure how to clean the cruft. It's not 100% repeatable. This is what it looks like:

image

I tried both suggestions to no effect.

re-installing beta 8 enabled me to view the project.json files however, I've had to abandon the beta 8 upgrade because I've spent 2 days trying to get my project to run with no success. I've reverted back to beta 7. Hopefully this is not a permanent blocker.

I've found that deleting the lock file seems to make it work again.

yeah for opening the project.json file. however I couldn't get my project to run using beta 8 upgrading from beta 7. 2 days of following various blog posts had got me nowhere. weird thing is, creating a new beta 8 project works perfectly. so not sure what I'm missing

Vinny\Shawn - were you able to get a dump file when VS was hung? I'd really like to understand why it was blocked this way.

Hi @shawnwildermuth Just tried your guide and have exactly the same issue.

I get a server 500 error trying to run a asp.net 5 website

Vinny

Hi everyone.

I managed to reinstall beta 8 and got past the 500 error however, I cannot open any .json files.

I've uninstalled beta 8 tooling then reinstalled.

I've Clear ComponentModelCache folder

I've cleared packages.

I've then deleted all the lock files.

Still, I can't seem to open any json files. Soon as I try visual studio freezes and I can only kill it using task manager. My colleagues are experiencing the same thing.

Any ideas ?

Vinny

Have you tried disabling JSON Schema Validation? I had a similar issue after installing the beta8 tooling; disabling all of the schema catalogs from Tools > Options > Text Editor > JSON > Schema has fixed it for now.

Disabling Schema has worked. Thanks for your help.

@madskristensen - is this a known issue?

@vinnytheviking Can you please try to turn the validation back on and create a dump file for us to look at?

I created a dump file earlier this morning ?

I've had to revert to beta 7 because of the kestrel 404 issue but that was
after the dump file was taken.

just let me know where you want me to put it

thanks

On 26 October 2015 at 16:29, Mads Kristensen [email protected]
wrote:

@vinnytheviking https://github.com/vinnytheviking Can you please try to
turn the validation back on and create a dump file for us to look at?

—
Reply to this email directly or view it on GitHub
https://github.com/aspnet/Tooling/issues/226#issuecomment-151197432.

@victorhurdugaci Just email it to madsk at Microsoft com

it's 1.9 gb big :-)

I can put it in my github account ???

Sure, that would be great. Thanks

I'm uploading to onedrive in compressed format. I'll send a link to your microsoft account.

Thanks for all the help

Vinny

@madskristensen I installed beta 8 today and hit this problem. I noticed that this issue was closed, but I'm not sure if there is another issue tracking the bug?

I was curious so I took a quick peak with the debugger. It looks like the issue may be in the method CatalogJSONSchemaSelector.IsProjectJSONUri() of Microsoft.VisualStudio.JSON.Package.dll. This method is calling task.Result from the main thread, presumably deadlocking the application:

image

I emailed my dump to madsk.

Disabling schema validation also allowed me to workaround the issue.

I believe the fix made it into RC1 and not Beta 8

I'm now having problems with VS 2015 Update 2. VS hangs as soon as I change a bit of text in project.json. Is this bug back? Setting "Enable validation" to false makes the problem go away. (I also unchecked the 1 schema catalog.)

Any luck? I'm having same problem with VS 2015 Update 2 Community Edition. As soon as start editing project.json, VS hangs.

@Kamalswami Did you try setting Tools -> Options -> Text Editor -> JSON -> Advanced -> "Enable validation" to false? That made things usable again for me, for the time being.

@jaredthirsk thanks. It works time being.

I am seeing this problem in VS Professional 2015 Update 2, regardless of whether or not I have JSON validation enabled. It's pretty brutal....VS not responsive on the order of minutes until it comes back. Happy to send a dump file or any other diagnostics as needed.

@madskristensen This seems to be a major issue again. This issue is closed so I'm wondering, is Microsoft aware of it?

@mlorbetske Any idea of what could cause this in VS2015 Update 2 since we didn't ship any updates to the JSON editor?

@madskristensen if the package sources from NuGet are different in U2 and are taking too long to search through, this can be the result. The search behavior has been reworked in RC2 and should make this better.

I can confirm that the frozen behavior definitely happens when I try to add dependencies. It's brutal...is there any workaround to this in the meantime? Happy to provide any diagnostics if needed

I'm having the exact same problem right now. Have tried to disable validation as someone suggested above, but no luck. It's pretty much unusable, several minutes hang time every few keystrokes :(

In the meantime I've been just adding the nuget packages and references manually

Yeah, ended up using VS code for the project.json changes I need :)

I had the same problem but disabling the default "(DevEnvDir))" folders in Options "External Web Tools" and disabling the JSON Schmea validation did the trick for me. Editing any JSON was almost unusable before.

Using VS2015.2.1

Doesn't look like it doesn't really use any CPU. Is it perhaps waiting for somthing?

Anyway, I can confirm that unchecking http://schemastore.org/api/json/catalog.json (which is the only option I had available) in [Tools > Options] under {Text Editor > JSON > Schema}.

Inserting http://json.schemastore.org/project manually after opening project.json works without issues (completion etc.), but without the schema store it is not resolved automatically.

I have also tried to leave the schema store on, and removing the schema after opening the file, but as soon as I edit the file freezes.

Is it possible to declare the schema in a JSON file?

Found the answer to my question: Yes you can!

Put "$schema": "http://json.schemastore.org/project", right after the opening bracket of your JSON file, and it stops freezing, even if the schema store is enabled. Removing that line again and it will freeze again when the schema store is on.

I'm still having this issue on a freshly installed machine with Visual Studio 2015 Professional update 3.
When I uncheck Tools > Options > Text Editor > JSON > General > Auto list members the problem is gone, but intellisense would sure be nice.
Is there a way to get fix this?

Was this page helpful?
0 / 5 - 0 ratings