Restore "[One .NET] fix GetAndroidDependencies target with --no-restore" #10339
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.
Context: a21d1a7
This reverts commit a84eccb.
I've noticed the following sometimes happens when a new .NET MAUI project is created in VS 2022 on Windows:
I seem to only get this for MAUI projects and only sometimes.
dotnet new android
projects seem to always work fine.When this error occurs, I think the dropdown fails to load the device list. What you end up with is the play button that just says
> Android Emulator
. After some amount of "fiddling", you can get the IDE to load the device list.What I think is happening is:
NuGet restore takes longer in MAUI projects than
dotnet new android
Sometimes
GetAndroidDependencies
runs before NuGet restore, and that triggers the above error.I could validate this hypothesis with:
And I get the above error! I could also reproduce in a test.