Skip to content

Fix WebClient usage in Xamarin.ProjectTools #10406

@jonathanpeppers

Description

@jonathanpeppers

Android framework version

net10.0-android (Preview)

Affected platform version

.NET 10

Description

Fix the warning:

src\Xamarin.Android.Build.Tasks\Tests\Xamarin.ProjectTools\Common\DownloadedCache.cs(36,5): warning SYSLIB0014: 'WebClient.WebClient()' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

This API is synchronous, but maybe we can use Task.Result or Task.Wait() in a way to make them synchronous?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions