dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
718 stars 1.56k forks source link

Revise AppDomain examples or indicate AppDomainSetup is not supported on .NET Core #788

Open masums opened 6 years ago

masums commented 6 years ago

What is the namespace or assembly name for class AppDomainSetup? At your given example AppDomainSetup not found. Project created using Visual Studio 15.7.3 and Asp.Net Core 2.1 MVC web project. Also tested at Core Console application. Do not find the class at .Net core project.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

svick commented 6 years ago

.Net Core does not support most AppDomain functionality and that includes the AppDomainSetup class.

Unfortunately, examples are currently the same for all frameworks, which means that even though you selected the .Net Core version of the AppDomain documentation, the Example code is not valid for .Net Core.

rpetrusha commented 6 years ago

Thanks for pointing out this issue, @masums. As @svick points out, the AppDomainSetup class is not supported by .NET Core. The issue you raise, though, is a significant one: AppDomain examples should either be revised to run on both .NET Framework and .NET Core, or their descriptions should make it clear which .NET implementation is supported. I'm going to change your issue description, @masums, to align with that, and add the issue to our community contributors project.

RaulRG commented 6 years ago

We are interested in porting our (very big) server to .NET Core. The portability report is showing problems with AppDomain.CreateDomain or AppDomainSetup. I understand that you will not include it in .NET Core, but maybe it would be a thing for the Windows Compatibility Pack?

svick commented 6 years ago

@RaulRG

I understand that you will not include it in .NET Core, but maybe it would be a thing for the Windows Compatibility Pack?

I don't think that's realistic. AppDomain is not something that you can add as a standalone library. It's an integral feature of .Net Framework that has been consciously removed from .Net Core. Adding it back would require significant changes to CoreCLR and I don't think that's going to happen.

RaulRG commented 6 years ago

Ok, good to know. This means we will need to analyze the uses and look for alternatives. Thank you for the information.