I am packaging a service fabric ASP.NET Core WebApp with a powershell script
$Env:ASPNETCORE_ENVIRONMENT = "Development"
$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe"
& C:\"Program Files (x86)"\NuGet\nuget.exe restore "D:\build-dir\ADM-DEV-JOB1\ConX.AdminFabricApp.sln" -source "https://api.nuget.org/v3/index.json;http://www.conxnuget.io/nuget"
& $msbuild "D:\build-dir\ADM-DEV-JOB1\ConX.AdminFabricApp\ConX.AdminFabricApp.sfproj" /t:Package /p:Configuration="Release"
when I run this script in ISE on the build server it runs fine, running as a bamboo task it fails and is missing a bunch of references like Nuget restore has not run (which it has according to logs) I am at a bit of a loss as to the issue here?