Closed eddie3716 closed 6 years ago
This part is probably the important bit:
Resolving assembly System.Management.Automation.resources, Version=3.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35
Error in PackagePowershell: The type initializer for 'System.Management.Automation.Runspaces.InitialSessionState' threw an exception.
It's throwing on a type initializer while attempting to call Assembly.Load()
for the missing assembly reference.
Normally not being able to load a referenced assembly would cause other problems later, but resource files play by different rules. The safe move is to probably just ignore all load failures in the runtime assembly resolver. Will submit a PR.
@daveaglick I am going to create a hotfix 0.27.2 branch, and push to GitHub. If you can then rebase your PR on that branch, we can merge it into the hotfix branch, and then we can get @eddie3716 (assuming he is willing) to test the package from MyGet, and if it works, we can roll out the hotfix.
How does that sound?
@daveaglick hotfix branch is ready.
@gep13 The hotfix branch is a couple commits behind develop - you want me to rebase and bring those in as well or cherry-pick into a branch directly off the hotfix branch?
@gep13 @daveaglick I wouldn't mind helping you test when you get your changes worked out. Though I'm not sure what process I would need to follow get the latest binaries. I'm assuming I could just pull down your branch and build that.
@daveaglick the hotfix branch comes from the main branch, so there will be commits on the develop branch that don’t exist on it. You can either cherry pick the single commit, or you can use rebase —onto hotfix/0.27.2 develop, either way works.
@gep13 Okay, I'll just cherry pick to keep it clean
@eddie3716 once merged, the nupkg will be pushed to MyGet, and a slight modification to your build.cake file will bring it in. I can provide more details once it is ready.
@gep13 Okay, redid this PR #2138 on top of the hotfix branch. Also redid PR #2139 on the hotfix branch for good measure since they're sort of related.
@eddie3716 NuGet packages are now available for testing on our MyGet feed
https://www.myget.org/feed/cake/package/nuget/Cake/0.27.2-beta0001 https://www.myget.org/feed/cake/package/nuget/Cake.CoreCLR/0.27.2-beta0001
I installed those two packages, sticked my Cake version to 0.27.2-beta0001, and re-ran by build script. @devlead @daveaglick @gep13 @SharpeRAD These beta Cake packages produce better results. I'm finally able to invoke the Powershell commands through the Cake.Powershell addin, which allows my jobs to successful complete. I also verified the Update-ModuleManifest command actually does what it's supposed to do. I would be fine if these code changes made it into the next release of Cake.
If you find it informative, here's the verbose output.....
PS C:\Users\ewood\Source\Repos\Powershell> .\build.ps1 -Target Package -Verbose Preparing to run build script... VERBOSE: Trying to find nuget.exe in PATH... VERBOSE: Found in PATH at C:\Program Files (x86)\NuGet\nuget.exe. VERBOSE: Restoring tools from NuGet... VERBOSE: Feeds used: C:\Users\ewood.nuget\packages\ https://api.nuget.org/v3/index.json
This is related to the ticket I opened against the Cake.Powershell project. https://github.com/SharpeRAD/Cake.Powershell/issues/55
While version 0.27.1 resolves the infinite recursion problem found in 0.27, there's still an issue with resolving dependencies properly. I tested my build scripts against version 0.27.1, and I'm having new problems now.... @SharpeRAD @daveaglick In the mean time, I've stickied my build scripts to Cake version 0.26.1
What You Are Seeing? (when using Cake v 0.27.1)
What version of Cake are you using?
0.27.1
Are you running on a 32 or 64 bit system?
64
What environment are you running on? Windows? Linux? Mac?
Windows
Are you running on a CI Server? If so, which one?
I'm running this on my local workstation, but I'll need it to eventually run on my Jenkins build slave.
How Did You Get This To Happen? (Steps to Reproduce)
In my packages.config, I updated my cake version from 0.26.1 to 0.27.1.
Output Log