Nota
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da se prijavite ili promenite direktorijume.
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da promenite direktorijume.
The following APIs are marked as obsolete, starting in .NET 6. Using them in code generates warning SYSLIB0019 at compile time.
- RuntimeEnvironment.SystemConfigurationFile property
- RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(Guid, Guid) method
- RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) method
These APIs always throw a PlatformNotSupportedException at runtime.
Workarounds
None.
Suppress a warning
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 SYSLIB0019
// Code that uses obsolete API.
// ...
// Re-enable the warning.
#pragma warning restore SYSLIB0019
To suppress all the SYSLIB0019 warnings in your project, add a <NoWarn> property to your project file.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
...
<NoWarn>$(NoWarn);SYSLIB0019</NoWarn>
</PropertyGroup>
</Project>
For more information, see Suppress warnings.