Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The AppDomain.CreateDomain(String) and AppDomain.Unload(AppDomain) methods are marked as obsolete, starting in .NET 6. Using them in code generates warning SYSLIB0024
at compile time and throws an exception at run time.
None.
If you must use the obsolete APIs, you can suppress the warning in code or in your project file.
To suppress only a single violation, add preprocessor directives to your source file to disable and then re-enable the warning.
// Disable the warning.
#pragma warning disable SYSLIB0024
// Code that uses obsolete API.
// ...
// Re-enable the warning.
#pragma warning restore SYSLIB0024
To suppress all the SYSLIB0024
warnings in your project, add a <NoWarn>
property to your project file.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
...
<NoWarn>$(NoWarn);SYSLIB0024</NoWarn>
</PropertyGroup>
</Project>
For more information, see Suppress warnings.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register now