SharpeRAD / Cake.Powershell

Powershell addin for Cake
http://cakebuild.net
MIT License
83 stars 36 forks source link

Could not load file or assembly 'System.Management.Automation' on windows 7 #26

Closed dv42 closed 7 years ago

dv42 commented 7 years ago

plugin works fine on windows 10, but today I run it on windows 7 and got this error:

Error: Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=3 1bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

I saw a fix for strong names in https://github.com/SharpeRAD/Cake.Powershell/commit/2547c8de2d4acb2f964ad380dcdf4a7edf192785 so I checked the version. I'm using 0.3.3 version of Cake.Powershell, so it should include fixes above, but I still have an error.

abjrcode commented 7 years ago

I have the same problem, but the agent running is cake script is an Ubuntu image. It can't find the Cake.Powershell/lib/net45/System.Management.Automation.dll (missing Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35))

SharpeRAD commented 7 years ago

Your issue is unrelated to this topic "Windows 7" and would have been better filed under "cross platform support".

If you you need to run this plugin on a windows 7 machine, simply update the installed version of Powershell to v3+.