project-system icon indicating copy to clipboard operation
project-system copied to clipboard

"Edit .... .csproj" is not available if project fails to load.

Open NickCraver opened this issue 8 years ago • 6 comments

If you hit an error like https://github.com/dotnet/roslyn-project-system/issues/1176, the project fails to load, but this also makes it harder to fix, because the option to edit the .csproj file is no longer available in intellisense. Here's the repo in the failed state: https://github.com/MiniProfiler/dotnet/tree/6e2ccc233da4f9d8614a57573857c885292e1881

and here's a screenshot:

screen shot 2017-01-16 at 13 53 57 screen shot 2017-01-16 at 13 54 01

NickCraver avatar Jan 16 '17 18:01 NickCraver

I suspect a few things:

  • We're not failing the factory creation - so we don't get the fake solution node that lets you reload or edit,
  • We're failing before our capability (EditProjectFile) is being taken into account.

davkean avatar Jan 16 '17 22:01 davkean

@333fred can you try to chase this down?

srivatsn avatar Jan 18 '17 19:01 srivatsn

Figured out the cause of this. CPS displays a different context menu in this case. Adding the command to that node causes everything to work correctly.

333fred avatar Jan 19 '17 21:01 333fred

I've opened https://github.com/dotnet/roslyn-project-system/pull/1341. There needs to be some discussion on the appropriate way to fix this, which will happen on that PR.

333fred avatar Jan 26 '17 01:01 333fred

This has been fixed in d16.0stg:

image

drewnoakes avatar Nov 27 '18 19:11 drewnoakes

@drewnoakes That's the stub hierarchy handling that and kicks in when the project factory fails, above is the case where CPS project factory creation succeeds, but CPS latter hits an error.

davkean avatar Nov 28 '18 00:11 davkean