Directly create virtual project when dotnet run-api is missing for now #78788
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From discussion with @jasonmalinowski, we think we should keep in the "directly creating" virtual project behavior that we had prior to #78648, at minimum until we can be pretty sure .NET 10 users will have an SDK with run-api available.
Without this change, users running with .NET 10 preview 4 SDK will not get intellisense in VS Code. They would have to install a nightly .NET 10 or wait for preview 5 to come out.
I did manually verify that this change works when SDK is pinned to preview 4. The log message about taking the fallback path gets written out and so on.
Most of the change here is copy/pasted from deleted lines in the linked PR #78648.
FYI @dibarbet we probably want to make sure this is in the next prerelease that goes out. Apologies for the inconvenience.