1

System.Net.Http.WinHttpHandler Nuget description says that it is Windows specific. But I was able to install it on an ASP.NET core project nevertheless.

Shouldn't it be prevented by Visual Studio to add such Windows specific dependencies to an ASP.NET Core project?

Julian
  • 33,915
  • 22
  • 119
  • 174
John L.
  • 1,825
  • 5
  • 18
  • 45

1 Answers1

2

If you have only the intentions to release on Windows, why should it be limited?

Of course cross platform is nice, but it isn't mandatory

Julian
  • 33,915
  • 22
  • 119
  • 174
  • I would at least expect a prompt that says that it is not cross-platform. Is there a way to tell this other than reading though its description? I would like to have compile-time check for this. – John L. Jun 03 '20 at 22:49
  • I don't think a warning is possible. This kind of information isn't in the nuget package. – Julian Jun 03 '20 at 22:51
  • PS. It's also documented here https://learn.microsoft.com/en-us/dotnet/api/system.net.http.winhttphandler and I guess the `Win` prefix gives a hint. But have to agree it's far from perfect! – Julian Jun 03 '20 at 22:52