Reputation: 135
Trying to build a .xproj with dnx451 as framework works fine locally but not on Visual Studio online builds.
Log:
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16231
Building DnxLibTests for DNX,Version=v4.5.1
Using Project dependency DnxLibTests 1.0.0
Source: C:\a\1\s\DnxLibTests\project.json
Unable to resolve dependency Microsoft.Dnx.Compilation.Abstractions 1.0.0-rc1-final
project.json
{
"version": "1.0.0-*",
"description": "DnxLibTests Class Library",
"authors": [ "" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"dependencies": {
"xunit": "2.1.0",
"xunit.runner.dnx": "2.1.0-rc1-build204"
},
"commands": {
"test": "xunit.runner.dnx"
},
"frameworks": {
"dnx451": { }
}
}
Upvotes: 1
Views: 370
Reputation: 29976
The packages of your project were not restored before build. To fix this issue, add following steps to run a dnu restore in your build process:
Get-ChildItem -Path $PSScriptRoot\src -Filter project.json -Recurse | ForEach-Object { & dnu restore $_.FullName 2>1 }
Save the definition and queue a new build, the build should be completed successfully.
Upvotes: 1