Running DNU recovery on VSO build

I am trying to get DNX projects generated on VSO server.

First you need to install DNX. To do this, I have the following permissions script:


dnvm upgrade -r clr -arch x86 -v 1.0.0-beta6


It successfully sets and updates the PATH:

Adding C: \ Users \ buildguest.dnx \ runtimes \ dnx-clr-win-x86.1.0.0-beta6 \ bin for the PATH process
Adding C: \ Users \ buildguest.dnx \ runtimes \ dnx-clr-win-x86. 1.0.0-beta6 \ bin for user PATH

Then I need to restore solution packages using this script:


dnu restore


But I am getting the following error when executing dnu-restore.ps1:

[error] dnu: The term 'dnu' is not recognized as the name of a cmdlet, function, script file, or workable program. Check the [Error] spelling of the name, or if the path was included, make sure the path is correct and try again.
[Error] When C: \ a \ 8ac4a4f6 \ Root \ MyProject \ Development \ dnu-restore.ps1: 1 char: 1
[error] + dnu restore
[error] + ~~~
[error] + CategoryInfo: ObjectNotFound: (dnu : String) [], CommandNotFoundException
[error] + FullyQualifiedErrorId: CommandNotFoundException

Build tasks:

Build tasks

Why is this happening? Should dnu

I do it? Is there a better way to restore DNX project packages?


source to share

1 answer

Using the Prebuild.ps1

script from this MSDN article solved the problem.

As Victor said, perhaps this is due to the fact that the stages are performed in different processes.



All Articles