mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Clean up ApplicationBase work-around
This commit is contained in:
1 parent
d40131ae44
commit
f0e64c2c6c
1 file changed
+10
-7
@@ -231,15 +231,18 @@ namespace System.Management.Automation
|
||||
/// </exception>
|
||||
internal static string GetApplicationBase(string shellId)
|
||||
{
|
||||
if (!Platform.IsCore)
|
||||
// TODO: #1184 will resolve this work-around
|
||||
// The application base cannot be resolved from the registry for side-by-side versions
|
||||
// of PowerShell.
|
||||
#if !CORECLR
|
||||
// try to get the path from the registry first
|
||||
string result = GetApplicationBaseFromRegistry(shellId);
|
||||
if (result != null)
|
||||
{
|
||||
// try to get the path from the registry first
|
||||
string result = GetApplicationBaseFromRegistry(shellId);
|
||||
if (result != null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if CORECLR // Use the location of SMA.dll as the application base
|
||||
// Assembly.GetEntryAssembly is not in CoreCLR. GAC is not in CoreCLR.
|
||||
|
||||
Reference in new issue
Block a user