I'm trying to set up continous deployment for an Azure Web App from Bitbucket. The deployment however fails with the following error:
Command: deploy.cmd
Handling ASP.NET 5 Web Application deployment.
Invoke-Command : Cannot validate argument on parameter 'Architecture'. The
argument "undefined" does not belong to the set ",x86,x64,arm" specified by
the ValidateSet attribute. Supply an argument that is in the set and then try
the command again.
At C:\Program Files
(x86)\SiteExtensions\Kudu\49.41216.1976\bin\scripts\dnvm.ps1:1914 char:9
+ Invoke-Command ([ScriptBlock]::Create("dnvm-$cmd $cmdargs"))
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Power
Failed exitCode=1, command=PowerShell -NoProfile -NoLogo -ExecutionPolicy
unrestricted -Command "
[System.Threading.Thread]::CurrentThread.CurrentCulture = '';
[System.Threading.Thread]::CurrentThread.CurrentUICulture = '';$CmdPathFile='"D:\local\UserProfile\.dnx\temp-set-envvars.cmd"';&
'C:\Program Files (x86)\SiteExtensions\Kudu\49.41216.1976\bin\scripts\dnvm.ps1' " install undefined -arch undefined -r undefined
Shell.Commands.InvokeCommandCommand
An error has occurred during web site deployment.
The publish/deployment directly from Visual Studio 2015 works without any problems. It seems like the dnvm.ps1 command is passed a bunch of "undefined" arguments causing this error. Creating the deployment script locally (as instructed here) by running
azure site deploymentscript --aspNet5 <path to the project.json file>
will also generate the deploy.cmd with same "undefined" variables.
I'm not using any custom deployment scripts and my global.json looks like:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-rc1-update1"
}
}