dotnet / project-system

The .NET Project System for Visual Studio
MIT License
969 stars 387 forks source link

Project needs to fail to load gracefully when the project's SDK is missing #962

Open RaulPerez1 opened 7 years ago

RaulPerez1 commented 7 years ago

This is potentially an MsBuild bug. When the project is missing targets it should fail to load (in the same way as a missing import). Currently it's loading but due to it missing targets there are many issues down the road (#921 is an example of this)

davkean commented 7 years ago

This isn't targets per se, but "SDKs". I think missing with regards to missing targets - there is a more graceful errors (and then the Installer query runs, to check for missing workloads)

jviau commented 7 years ago

I think this is 2 issues.

1) SDK is missing. In this case MSBuild should throw an exception and it will be displayed to the user. 2) Props/Targets is missing critical XAML Rule files. This will be a CPS fix. Right now CPS throws an obscure error along the lines of "ConfigurationGeneral BrowseObject could not be found" when critical rule files that must be present for CPS to run are missing. We need to display a clearer message to the user.

srivatsn commented 7 years ago

2 is also tracked by https://github.com/dotnet/roslyn-project-system/issues/793

srivatsn commented 7 years ago

Changing this issue to track the work to show some UI around missing SDK and offering some acquisition experience.