question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove FullCLR code

See original GitHub issue

This project started as a fork of the Windows PowerShell 5.1 code base. As we’ve progressed towards a PowerShell Core 6.0 release and with the capability of dotnet core 2.0 and dotnet std 2.0 being able to load dotnet framework 4.5.1+ assemblies that are compatible with dotnet std 2.0, we can simplify the code base by removing the legacy FullCLR code so that we no longer have #ifdefs for CORECLR (and !CORECLR). This was discussed and approved by @PowerShell/powershell-committee. When reviewing the code, do not blindly just remove the FullCLR code, but validate if updates to .NET Core means using the FullCLR code instead of the limited .NET Core code.

Remaining #if [!]CORECLR usages

param($path = "../repos/PowerShell")

$sources = Get-ChildItem -Recurse -Path $path -Include *.cs
foreach ($source in $sources) {
    $content = Get-Content $source -Raw
    if ($content -match "#if CORECLR" -or $content -match "#if !CORECLR") {
        $source.FullName
    }
}

src/Microsoft.PowerShell.Commands.Diagnostics/CoreCLR/Stubs.cs src/Microsoft.PowerShell.Commands.Diagnostics/CommonUtils.cs src/Microsoft.PowerShell.Commands.Diagnostics/ExportCounterCommand.cs src/Microsoft.PowerShell.Commands.Diagnostics/GetCounterCommand.cs src/Microsoft.PowerShell.Commands.Diagnostics/ImportCounterCommand.cs src/Microsoft.PowerShell.Commands.Diagnostics/NewWinEventCommand.cs src/Microsoft.PowerShell.Commands.Utility/commands/utility/new-object.cs src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Extensions.cs src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Sam.cs src/Microsoft.PowerShell.Security/security/AclCommands.cs src/Microsoft.PowerShell.Security/security/CertificateProvider.cs src/Microsoft.PowerShell.Security/security/ExecutionPolicyCommands.cs src/Microsoft.WSMan.Management/CredSSP.cs src/Microsoft.WSMan.Management/Interop.cs src/Microsoft.WSMan.Management/WsManHelper.cs src/System.Management.Automation/cimSupport/cmdletization/xml/CoreCLR/cmdlets-over-objects.xmlSerializer.autogen.cs src/System.Management.Automation/cimSupport/cmdletization/ScriptWriter.cs src/System.Management.Automation/CoreCLR/CorePsAssemblyLoadContext.cs src/System.Management.Automation/DscSupport/CimDSCParser.cs src/System.Management.Automation/engine/debugger/debugger.cs src/System.Management.Automation/engine/hostifaces/Command.cs src/System.Management.Automation/engine/hostifaces/Connection.cs src/System.Management.Automation/engine/hostifaces/ConnectionBase.cs src/System.Management.Automation/engine/hostifaces/HostUtilities.cs src/System.Management.Automation/engine/hostifaces/InternalHost.cs src/System.Management.Automation/engine/hostifaces/LocalConnection.cs src/System.Management.Automation/engine/hostifaces/LocalPipeline.cs src/System.Management.Automation/engine/hostifaces/Parameter.cs src/System.Management.Automation/engine/hostifaces/PowerShell.cs src/System.Management.Automation/engine/hostifaces/PowerShellProcessInstance.cs src/System.Management.Automation/engine/hostifaces/RunspacePool.cs src/System.Management.Automation/engine/hostifaces/RunspacePoolInternal.cs src/System.Management.Automation/engine/interpreter/ControlFlowInstructions.cs src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs src/System.Management.Automation/engine/parser/Compiler.cs src/System.Management.Automation/engine/parser/FusionAssemblyIdentity.cs src/System.Management.Automation/engine/parser/GlobalAssemblyCache.cs src/System.Management.Automation/engine/parser/Parser.cs src/System.Management.Automation/engine/parser/TypeResolver.cs src/System.Management.Automation/engine/remoting/client/remoterunspace.cs src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs src/System.Management.Automation/engine/remoting/commands/EnterPSHostProcessCommand.cs src/System.Management.Automation/engine/remoting/commands/remotingcommandutil.cs src/System.Management.Automation/engine/remoting/commands/ResumeJob.cs src/System.Management.Automation/engine/remoting/commands/SuspendJob.cs src/System.Management.Automation/engine/remoting/common/WireDataFormat/EncodeAndDecode.cs src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs src/System.Management.Automation/engine/remoting/common/throttlemanager.cs src/System.Management.Automation/engine/remoting/fanin/BaseTransportManager.cs src/System.Management.Automation/engine/remoting/fanin/InitialSessionStateProvider.cs src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs src/System.Management.Automation/engine/remoting/fanin/WSManPluginFacade.cs src/System.Management.Automation/engine/remoting/fanin/WSManTransportManager.cs src/System.Management.Automation/engine/remoting/server/OutOfProcServerMediator.cs src/System.Management.Automation/engine/remoting/server/ServerPowerShellDriver.cs src/System.Management.Automation/engine/remoting/server/serverremotesession.cs src/System.Management.Automation/engine/remoting/server/ServerRunspacePoolDriver.cs src/System.Management.Automation/engine/remoting/server/ServerSteppablePipelineDriver.cs src/System.Management.Automation/engine/Attributes.cs src/System.Management.Automation/engine/CommandDiscovery.cs src/System.Management.Automation/engine/CommandMetadata.cs src/System.Management.Automation/engine/ExecutionContext.cs src/System.Management.Automation/engine/GetEvent_Types_Ps1Xml.cs src/System.Management.Automation/engine/InitialSessionState.cs src/System.Management.Automation/engine/LanguagePrimitives.cs src/System.Management.Automation/engine/MshCommandRuntime.cs src/System.Management.Automation/engine/pipeline.cs src/System.Management.Automation/engine/serialization.cs src/System.Management.Automation/engine/Types_Ps1Xml.cs src/System.Management.Automation/engine/Utils.cs src/System.Management.Automation/help/HelpSystem.cs src/System.Management.Automation/help/UpdatableHelpCommandBase.cs src/System.Management.Automation/help/UpdatableHelpSystem.cs src/System.Management.Automation/help/UpdateHelpCommand.cs src/System.Management.Automation/logging/MshLog.cs src/System.Management.Automation/namespaces/FileSystemProvider.cs src/System.Management.Automation/namespaces/RegistryProvider.cs src/System.Management.Automation/namespaces/Win32Native.cs src/System.Management.Automation/security/SecureStringHelper.cs src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs src/System.Management.Automation/utils/ClrFacade.cs src/System.Management.Automation/utils/StructuredTraceSource.cs

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:28 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
rjmholtcommented, Apr 5, 2018

EDIT: Moved the list into the top-level issue description at the request of @daxian-dbw.

[big list used to be here]

1reaction
iSazonovcommented, Jul 12, 2019

Search results for #if .*CORECLR - 543 results in 186 files.

Now search results for #if .*CORECLR - 174 results in 70 files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

powershell - Removing module also attempts to ...
When removing a custom-built module for the first time in a PowerShell session using ... \Modules\PackageManagement\1.3.1\fullclr\Microsoft.
Read more >
fullclr/Google.PowerShell.dll-Help.xml 1.0.1.10
fullclr /Google. ... This field also accepts DatasetData objects so they can be mapped to full Dataset ... PS C:\> Remove-BqDataset $set -Force</dev:code>...
Read more >
PowerShell Core 6.0: Generally Available (GA) and ...
Windows PowerShell is the edition of PowerShell built on top of .NET Framework (sometimes referred to as “FullCLR”): This is the PowerShell that ......
Read more >
Navigate Code - ReSharper Platform SDK
Find the navigation target (a particular code element). ... Node by Full CLR Name (this code actively operates with project model and PSI ......
Read more >
Azs.Azurebridge.Admin 0.1.0 - PowerShell Gallery
Azs.Azurebridge.Admin. 0.1.0. AzureBridge Admin Client. There is a newer prerelease version of this module available. See the version list below for details.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found