forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] Add XA1031 error for `AndroidHttpClient…
…HandlerType` Fixes dotnet#7326 We should check the value of the `AndroidHttpClientHandlerType` property during the build process. This property can have a number of different values depending on what version of Xamarin.Android is being used. Under Classic a valid value is `Xamarin.Android.Net.AndroidClientHandler`, however under .NET 6+ the valid values are - `Xamarin.Android.Net.AndroidMessageHandler`. - `System.Net.Http.SocketsHttpHandler, System.Net.Http`. We should raise an error if the user is using an invalid value.
- Loading branch information
1 parent
acfc1ef
commit 1b5ca05
Showing
16 changed files
with
503 additions
and
167 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Xamarin.Android error XA1031 | ||
description: XA1031 error code | ||
ms.date: 10/10/2022 | ||
--- | ||
# Xamarin.Android error XA1031 | ||
|
||
## Example messages | ||
|
||
``` | ||
The 'AndroidHttpClientHandlerType' property value 'Foo.Bar.HttpHander, MyApp' must derive from 'System.Net.Http.HttpMessageHandler'. | ||
Please change the value to an assembly-qualifed type name which inherits from '{1}' or remove the property completely. | ||
``` | ||
|
||
## Solution | ||
|
||
Edit your csproj directly and change the 'AndroidHttpClientHandlerType' to | ||
a valid value. | ||
|
||
Valid values can be found at `~/android/deploy-test/building-apps/build-properties.md#AndroidHttpClientHandlerType`. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Xamarin.Android error XA1032 | ||
description: XA1032 error code | ||
ms.date: 10/10/2022 | ||
--- | ||
# Xamarin.Android error XA1032 | ||
|
||
## Example messages | ||
|
||
``` | ||
Failed to resolve '{0}' from '{1}'. Please check your `AndroidHttpClientHandlerType` setting. | ||
``` | ||
|
||
## Solution | ||
|
||
Edit your csproj directly and change the 'AndroidHttpClientHandlerType' to | ||
a valid value. | ||
|
||
Valid values can be found at `~/android/deploy-test/building-apps/build-properties.md#AndroidHttpClientHandlerType`. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Xamarin.Android error XA1033 | ||
description: XA1033 error code | ||
ms.date: 10/10/2022 | ||
--- | ||
# Xamarin.Android error XA1033 | ||
|
||
## Example messages | ||
|
||
``` | ||
Could not resolve '{0}'. Please check your `AndroidHttpClientHandlerType` setting. | ||
``` | ||
|
||
## Solution | ||
|
||
Edit your csproj directly and change the 'AndroidHttpClientHandlerType' to | ||
a valid value. | ||
|
||
Valid values can be found at `~/android/deploy-test/building-apps/build-properties.md#AndroidHttpClientHandlerType`. |
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
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
Oops, something went wrong.