You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to use Cake.Powershell with a Powershell module that I download and install via Install-Module from the PSGallery.
I can run these commands in an admin Powershell window, but when I try to run it through the Cake.Powershell module it throws an exception. The commands are:
(I'm just trying to detect if it succesfully finds UnitySetup - installing the package provider probably throws off what gets returned, so I'll probably have to adjust my logic once I get it to stop throwing exceptions)
And the exception I get is:
Unhandled Exception - Message:'The type initializer for 'Microsoft.PackageManagement.Internal.Utility.Plugin.DynamicType' threw an exception.' Name:'TypeInitializationException' Stack Trace:' at Microsoft.PackageManagement.Internal.Utility.Plugin.DynamicType.Create(Type tInterface, OrderedDictionary2 instanceMethods, List2 delegateMethods, List1 stubMethods, List2 usedInstances)
Now I see you have Powershell Core enabled only for Linux. I'd just like to ask that if practicable, that there be an option for Windows users to use Powershell Core instead of Powershell. I'm like, 90% sure that this problem would vanish in Powershell Core.
However, do you have any thoughts on what I can do to try to mitigate this issue?
The text was updated successfully, but these errors were encountered:
Okay, so after a bunch of reading, I'm better understanding that the Powershell.SDK allows for re-hosting Powershell, and that for .NET 5.0 it's using Powershell 7.1.2. I switched over to .NET 5 just to make sure the issue wasn't from an older version of Powershell.
I'm still running into the problem, but I'm starting to suspect this is more about installing modules into the PS Host than anything related to Powershell version.
Hi, I'm trying to use Cake.Powershell with a Powershell module that I download and install via Install-Module from the PSGallery.
I can run these commands in an admin Powershell window, but when I try to run it through the Cake.Powershell module it throws an exception. The commands are:
The actual calling code is
(I'm just trying to detect if it succesfully finds UnitySetup - installing the package provider probably throws off what gets returned, so I'll probably have to adjust my logic once I get it to stop throwing exceptions)
And the exception I get is:
Now I see you have Powershell Core enabled only for Linux. I'd just like to ask that if practicable, that there be an option for Windows users to use Powershell Core instead of Powershell. I'm like, 90% sure that this problem would vanish in Powershell Core.
However, do you have any thoughts on what I can do to try to mitigate this issue?
The text was updated successfully, but these errors were encountered: