As per, https://docs.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0024 the usage of AppDomain.Unload is deprecated and should be removed.
It is used at:
|
internal void ReleaseResponsibilityForModuleAnalysisAppDomain() |
|
{ |
|
Diagnostics.Assert(_responsibilityForModuleAnalysisAppDomainOwned, "Invalid module analysis app domain state"); |
|
|
|
if (AppDomainForModuleAnalysis != null) |
|
{ |
|
AppDomain.Unload(AppDomainForModuleAnalysis); |
|
AppDomainForModuleAnalysis = null; |
|
} |
|
|
|
_responsibilityForModuleAnalysisAppDomainOwned = false; |
|
} |
As per discussion with Dongbo Wang (@daxian-dbw) the code is old and not used anymore and should be cleaned up.
Steps to reproduce
Compile code with .NET 6 preview 5 will throw a warning causing a build break: https://github.com/PowerShell/PowerShell/runs/2764430556?check_suite_focus=true#step:4:105
As per, https://docs.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0024 the usage of
AppDomain.Unloadis deprecated and should be removed.It is used at:
PowerShell/src/System.Management.Automation/engine/ExecutionContext.cs
Lines 222 to 233 in 4aaed08
As per discussion with Dongbo Wang (@daxian-dbw) the code is old and not used anymore and should be cleaned up.
Steps to reproduce
Compile code with .NET 6 preview 5 will throw a warning causing a build break: https://github.com/PowerShell/PowerShell/runs/2764430556?check_suite_focus=true#step:4:105