Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
Implicit
The implicit global using directive for the System.Net.Http namespace was removed for .NET Framework TFMs in an SDK-style project. This change was made because it's not guaranteed that the System.Net.Http namespace will be accessible in a .NET Framework-targeted project, because the library typically requires an additional reference. With this change, .NET Framework projects are more likely to compile when they are first created.
Previous behavior
For SDK-style projects with .NET Framework TFMs, a global using directive for System.Net.Http was injected into the project's build process.
New behavior
The global using directive for System.Net.Http is no longer added automatically.
Version introduced
.NET 8 Preview 6
Type of breaking change
This change can affect source compatibility and is also a behavioral change.
Reason for change
Default projects should compile.
Recommended action
If you relied on the implicit global using directive, you can:
- Add a global
usingdirective to one of your source files. - Add a
usingdirective to each source code file that uses APIs from System.Net.Http.
Affected APIs
N/A