Uh oh!
There was an error while loading. Please reload this page.
Update Error messaging and Documentation to include IDE/CLI instructions - #8494
Merged
Conversation
dellis1972force-pushed
the
Issue8413
branch
2 times, most recently
from
November 16, 2023 14:48
21ba8af to
86625b1Comparedellis1972force-pushed
the
Issue8413
branch
2 times, most recently
from
November 27, 2023 09:46
9951fd7 to
8799491Comparedellis1972
marked this pull request as ready for review
November 27, 2023 10:08
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dellis1972force-pushed
the
Issue8413
branch
2 times, most recently
from
November 29, 2023 10:00
4bb3ec4 to
8a774caCompareCo-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
Wrap MSBuild properties which may contain spaces in double-quotes. Fix message formatting.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Contributor
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 Studioerror 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 Macerror 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 Studioerror 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 Codeerror 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/
This file contains hidden or 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
Sign up for freeto 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
AndroidInstallDependenciesto mention parameters which are required in order for the target to function correctly.