Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell bootstrap script not working with PS 6 #21

Open
gep13 opened this issue Dec 7, 2016 · 7 comments
Open

PowerShell bootstrap script not working with PS 6 #21

gep13 opened this issue Dec 7, 2016 · 7 comments

Comments

@gep13
Copy link
Member

gep13 commented Dec 7, 2016

@kentcb commented on Tue Dec 06 2016

What You Are Seeing?

When running the bootstrap script on PowerShell 6 (.NET core):

Method invocation failed because [System.Reflection.Assembly] does not contain a method named 'LoadWithPartialName'.
At C:\XXX\build.ps1:58 char:1
+ [Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-N ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound

$PSVersionTable.PSVersion gives me:

Major Minor Patch Label
----- ----- ----- -----
    6     0     0 alpha

What is Expected?

Script should work with new versions of PS.

What version of Cake are you using?

Haven't gotten that far yet (bootstrapping).

Are you running on a 32 or 64 bit system?

64 bit.

What environment are you running on? Windows? Linux? Mac?

Windows 10, but the same behavior should be present on other operating systems.

Are you running on a CI Server? If so, which one?

No

How Did You Get This To Happen? (Steps to Reproduce)

  1. Grab the bootstrap script
  2. Attempt to execute it in a PS 6 session

Output Log

N/A

@gep13
Copy link
Member Author

gep13 commented Dec 7, 2016

@devlead as the resident PowerShell guru, do you have any thoughts on this one?

@netxph
Copy link

netxph commented Jul 12, 2017

Just comment out
[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null

System.Security is already inside System.Core. I updated, to PowerShell 6 b3, and should be working now.

@gjonespf
Copy link

gjonespf commented Aug 7, 2017

Made a quick patch for this for PS6, uses Get-FileHash in its place:
master...gjonespf:xplat-md5
Worth a PR?

@devlead
Copy link
Member

devlead commented Aug 7, 2017

@gjonespf sure

@fleed
Copy link

fleed commented Jan 17, 2018

Powershell Core 6.0 is out: https://blogs.msdn.microsoft.com/powershell/2018/01/10/powershell-core-6-0-generally-available-ga-and-supported/.
Any plan to have first-class support for it?

@devlead
Copy link
Member

devlead commented Jan 17, 2018

Yes, just released 0.25.0 will give us the opportunity make bootstrappers cleaner, shouldn't be too hard to support it.

@devlead
Copy link
Member

devlead commented Jan 23, 2018

Hopefully the discussion and work going on in issue #53 will sort this too, that's the goal at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants