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
{{ message }}
Repository navigation
Could not load file or assembly 'System.Management.Automation' after update to .NET 7 #19078
After updating our project to .NET 7, we are unable to run any of our tests via Windows PowerShell using NUnitConsole 3.16.x
Running the same tests with dotnet test works just fine.
Scripts are run on PowerShell 5.1.19041.1237 and Windows 10 (build 19043.1288). We did try to use the newest version of PS as well but without any success.
Removing reference to Microsoft.PowerShell.SDK from the project allows us to run tests via NUnitConsole, however we don't have any idea why is that the case.
NuGet packages in output project which may have some influence:
PS C:\Users\everything411> Compare-Object
Compare-Object: The 'Compare-Object' command was found in the module 'Microsoft.PowerShell.Utility', but the module could not be loaded due to the following error: [Could not load file or assembly 'System.Management.Automation, Version=7.3.2.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. 系统找不到指定的文件。]
For more information, run 'Import-Module Microsoft.PowerShell.Utility'.
everything in Microsoft.PowerShell.Utility failed to work properly
Activity
everything411 commentedon Feb 2, 2023
same problem.
everything in Microsoft.PowerShell.Utility failed to work properly
iSazonov commentedon Feb 2, 2023
Seems dup #16862
adityapatwardhan commentedon Apr 18, 2023
The issue is fixed by #19302
Please re-open if you still see the issue.