I am developing my first ASP.NET 5 Application and I have some problems with hosted build on Visual Studio Team Services (was Visual Studio Online). I get the error:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets(126,5): Error : The Dnx Runtime package needs to be installed.
One row before I see following Build message: Cannot find DNX runtime dnx-clr-win-x86.1.0.0-beta8 in the folder: C:\Users\buildguest.dnx\runtimes
I found the solution with Prebuild-Powershell script (https://msdn.microsoft.com/Library/vs/alm/Build/azure/deploy-aspnet5)
Note: I added the ASP.Net 5 MVC Project to an existing solution. I have no global.json file and src folder! This is the reason why I have adapted the script as follows:
& iex((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))
$dnxVersion = "latest"
& $env:USERPROFILE\.dnx\bin\dnvm install $dnxVersion -Persistent
Get-ChildItem -Path $PSScriptRoot\..\InternalWeb.Client -Filter project.json -Recurse | ForEach-Object { & dnu restore $_.FullName 2>1 }
The script runs after Build step "Get sources" and has following output:
But, I get still the same error message! What's wrong? Thanks for help! Michael