cake-build / resources

Contains different kind of resources such as bootstrappers and configuration files.
MIT License
54 stars 78 forks source link

PowerShell bootstrap script is not working when executing inside docker container #58

Closed endejoli closed 5 years ago

endejoli commented 6 years ago

While executing Powershell bootstrap script inside docker container

Method invocation failed because [System.Reflection.Assembly] does not contain a method named 'LoadWithPartialName'. At C:\dotnet\build.ps1:90 char:1

Preparing to run build script... Could not download packages.config. At C:\dotnet\build.ps1:152 char:9

$PSVersionTable.PSVersion shows powershell version is 5

Major Minor Build Revision


5 1 14393 1000

Environment? Windows 10

Dockerfile

FROM microsoft/aspnetcore-build ADD . c:\dotnet

devlead commented 6 years ago

That is a nanoserver image so lacks full .NET, current Powershell bootstrapper relies on full windows

You could try this CoreCLR one to see if that works with your container https://github.com/csharpfritz/CoreWiki/blob/dev/build.ps1

endejoli commented 6 years ago

with CoreCLR bootstrap fie I got below errors

PS C:\dotnet> .\build.ps1 Add-Type : Cannot find path 'C:\dotnet\System.IO.Compression.Filesystem.dll' because it does not exist. At C:\dotnet\build.ps1:15 char:1

Installing Cake 0.26.1... New-Object : Cannot find type [System.Net.WebClient]: verify that the assembly containing this type is loaded. At C:\dotnet\build.ps1:31 char:7

Exception calling "ExtractToDirectory" with "2" argument(s): "Could not find file 'C:\dotnet\tools\Cake.zip'." At C:\dotnet\build.ps1:21 char:5

Remove-Item : Cannot find path 'C:\dotnet\tools\Cake.zip' because it does not exist. At C:\dotnet\build.ps1:33 char:6

No executable found matching command "dotnet-C:\dotnet\tools\Cake.CoreCLR.0.26.1\Cake.dll"

devlead commented 5 years ago

This should be fixed by #70