-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Error messaging and Documentation to include IDE/CLI instructions #8494
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dellis1972
force-pushed
the
Issue8413
branch
2 times, most recently
from
November 16, 2023 14:48
21ba8af
to
86625b1
Compare
dellis1972
force-pushed
the
Issue8413
branch
2 times, most recently
from
November 27, 2023 09:46
9951fd7
to
8799491
Compare
dellis1972
changed the title
Issue8413
Update Error messaging and Documentation to include IDE/CLI instructions
Nov 27, 2023
dellis1972
requested review from
jonathanpeppers and
jonpryor
as code owners
November 27, 2023 10:08
dellis1972
force-pushed
the
Issue8413
branch
2 times, most recently
from
November 29, 2023 10:00
4bb3ec4
to
8a774ca
Compare
Co-authored-by: Jonathan Peppers <[email protected]>
Co-authored-by: Jonathan Peppers <[email protected]>
Wrap MSBuild properties which may contain spaces in double-quotes. Fix message formatting.
dellis1972
force-pushed
the
Issue8413
branch
from
November 30, 2023 13:56
3310731
to
d0d2811
Compare
jonpryor
reviewed
Nov 30, 2023
jonpryor
reviewed
Nov 30, 2023
Draft commit message: Context: https://github.com/xamarin/xamarin-android/issues/8413
Context: https://github.com/xamarin/xamarin-android/issues/8522
The [XA5207][0] error message contained IDE-specific instructions:
# Visual Studio
error XA5207: Could not find android.jar for API Level 28. This means the Android SDK platform for API Level 28 is not installed.
Either install it in the Android SDK Manager (Tools > Android > Android SDK Manager...), or change your Xamarin.Android project
to target an API version that is installed.
# Visual Studio for Mac
error XA5207: Could not find android.jar for API Level 28. This means the Android SDK platform for API Level 28 is not installed.
Either install it in the Android SDK Manager (Tools > Open Android SDK Manager...), or change your Xamarin.Android project
to target an API version that is installed.
[Visual Studio for Mac is now deprecated][1]:
> Visual Studio for Mac is scheduled for retirement by August 31, 2024
Visual Studio Code is now supported, via [C# Dev Kit][2] and the
[.NET MAUI][3] extensions. ([Announcement][4].)
These changes mean that our error messages are obsolete (building on
macOS) or misleading (building within VSCode on Windows).
Update the XA5207 error generation logic to take these changes into
consideration. Visual Studio (Windows) will retain the existing
error message text. The Visual Studio for Mac instructions are
replaced with instructions for command-line builds, for use from
Visual Studio Code:
# Visual Studio
error XA5207: Could not find android.jar for API Level 28. This means the Android SDK platform for API Level 28 is not installed;
it was expected to be in `…`.
Either install it in the Android SDK Manager (Tools > Android > Android SDK Manager...), or change the .NET Android project
to target an API version that is installed.
See https://aka.ms/xa5207 for more details.
# Visual Studio Code
error XA5207: Could not find android.jar for API Level 28. This means the Android SDK platform for API Level 28 is not installed;
it was expected to be in `…`.
You can install the missing API level by running
`dotnet build -t:InstallAndroidDependencies -f net8.0-android "-p:AndroidSdkDirectory=…"`,
or change the project to target an API version that is installed.
See https://aka.ms/xa5207 for more details.
Also update some of the documentation around the
`InstallAndroidDependencies` target to mention `dotnet build` options
which are required in order for the target to function correctly.
[0]: https://github.com/xamarin/xamarin-android/blob/40cc8eaf78eb9f95abcc0e966ab274cef1692acc/Documentation/guides/messages/xa5207.md
[1]: https://learn.microsoft.com/en-us/visualstudio/mac/what-happened-to-vs-for-mac?view=vsmac-2022
[2]: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit
[3]: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-maui
[4]: https://devblogs.microsoft.com/visualstudio/announcing-the-dotnet-maui-extension-for-visual-studio-code/ |
jonathanpeppers
approved these changes
Dec 6, 2023
jonathanpeppers
pushed a commit
that referenced
this pull request
Dec 6, 2023
Context: #8413 Context: #8522 The [XA5207][0] error message contained IDE-specific instructions: # Visual Studio error XA5207: Could not find android.jar for API Level 28. This means the Android SDK platform for API Level 28 is not installed. Either install it in the Android SDK Manager (Tools > Android > Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed. # Visual Studio for Mac error XA5207: Could not find android.jar for API Level 28. This means the Android SDK platform for API Level 28 is not installed. Either install it in the Android SDK Manager (Tools > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed. [Visual Studio for Mac is now deprecated][1]: > Visual Studio for Mac is scheduled for retirement by August 31, 2024 Visual Studio Code is now supported, via [C# Dev Kit][2] and the [.NET MAUI][3] extensions. ([Announcement][4].) These changes mean that our error messages are obsolete (building on macOS) or misleading (building within VSCode on Windows). Update the XA5207 error generation logic to take these changes into consideration. Visual Studio (Windows) will retain the existing error message text. The Visual Studio for Mac instructions are replaced with instructions for command-line builds, for use from Visual Studio Code: # Visual Studio error XA5207: Could not find android.jar for API Level 28. This means the Android SDK platform for API Level 28 is not installed; it was expected to be in `…`. Either install it in the Android SDK Manager (Tools > Android > Android SDK Manager...), or change the .NET Android project to target an API version that is installed. See https://aka.ms/xa5207 for more details. # Visual Studio Code error XA5207: Could not find android.jar for API Level 28. This means the Android SDK platform for API Level 28 is not installed; it was expected to be in `…`. You can install the missing API level by running `dotnet build -t:InstallAndroidDependencies -f net8.0-android "-p:AndroidSdkDirectory=…"`, or change the project to target an API version that is installed. See https://aka.ms/xa5207 for more details. Update some of the documentation around the `InstallAndroidDependencies` target to mention `dotnet build` options which are required in order for the target to function correctly. Finally, update various error messages, replacing "Xamarin.Android" with ".NET Android". [0]: https://github.com/xamarin/xamarin-android/blob/40cc8eaf78eb9f95abcc0e966ab274cef1692acc/Documentation/guides/messages/xa5207.md [1]: https://learn.microsoft.com/en-us/visualstudio/mac/what-happened-to-vs-for-mac?view=vsmac-2022 [2]: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit [3]: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-maui [4]: https://devblogs.microsoft.com/visualstudio/announcing-the-dotnet-maui-extension-for-visual-studio-code/
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #8413
Context #8522
There was a single point in our error messaging which has IDE specific instructions. We need to update this since VSForMac has been deprecated and VSCode is now supported. Our error messaging should take into account which
IDE is being used. For standard VS we keep the existing instructions. For anything else we should provide the required
Command Line instructions. This will include VSCode since the UI elements present in VS are not present in VSCode.
Also update some of the documentation around
AndroidInstallDependencies
to mention parameters which are required in order for the target to function correctly.