I'm trying to deploy my ASP.NET 5 Beta 7 web application to Azure platform using Continuous Deployment on Visual Studio Online.
I've already follow these guides:
- https://msdn.microsoft.com/en-us/Library/vs/alm/Build/azure/deploy-aspnet5 -> to deploy asp.net 5 web apps
- http://www.brandonmartinez.com/2015/09/16/deploying-asp-net-5-beta-7-through-vso/ -> changes to previous guide to deploy asp.net 5 Beta 7 web apps
When I commit and push a changes, the build task triggers correctly but it fails when executing prepublish script of project.json:
"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
}
The error (warning) is:
npm WARN optional dep failed, continuing fsevents@1.0.0
I was able to deploy by enabling Continue on error option in the build definition and only for PublishLocal.ps1 step (that fails).
Visual Studio Online completes (partially) the build and deploy my site to Azure and everything seems to works without problems, but, what is that error? There is a way to fix it?
Here is my PublishLocal.ps1 step (from http://www.brandonmartinez.com/2015/09/16/deploying-asp-net-5-beta-7-through-vso/):
#Requires -Version 3.0
param($vsoProjectName, $projectName, $buildConfiguration, $buildSourcesDirectory)
$VerbosePreference = "continue"
&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}
$globalJson = Get-Content -Path $PSScriptRoot\global.json -Raw -ErrorAction Ignore | ConvertFrom-Json -ErrorAction Ignore
if($globalJson)
{
$dnxVersion = $globalJson.sdk.version
}
else
{
Write-Warning "Unable to locate global.json to determine using 'latest'"
$dnxVersion = "latest"
}
& $env:USERPROFILE\.dnx\bin\dnvm install $dnxVersion -Persistent
$dnxRuntimePath = "$($env:USERPROFILE)\.dnx\runtimes\dnx-clr-win-x86.$dnxVersion"
& dnu build "$PSScriptRoot\src\$projectName" --configuration "$buildConfiguration"
& dnu publish "$PSScriptRoot\src\$projectName" --configuration "$buildConfiguration" --out "$buildSourcesDirectory\$vsoProjectName\artifacts\bin\$buildConfiguration\Publish" --runtime "$dnxRuntimePath"