Tfs build cannot find Dnx Runtime for Asp.net core application

135 views Asked by At

When trying to build an Asp.net application the error

Cannot find DNX runtime dnx-clr-win-x86.1.0.0-rc1-final in the folder: C:\Windows\ServiceProfiles\NetworkService.dnx\runtimes

When I log on to our TFS build server to install the required dnx version using

dnvm install 1.0.0-rc1

it's installed in C:\Users\myusername.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2.

Our Tfs build process is run with a domain account.

  1. How can I install the Dnx runtime in a more generic location?
  2. Why is the build process looking for the runtime from that location (NetworkService)?
2

There are 2 answers

2
PatrickLu-MSFT On

Seems you need to install Visual Studio to get the required targets.

Right now the DNX MSBuild targets are only installed with Visual Studio 2015 (specifically the Web Development Tools component).

Take a look at this blog which may help you: Is DNX compatible with MSBuild already?

0
Eddie Chen - MSFT On

Your project is using "1.0.0-rc1-final" but the version installed with "dnvm install 1.0.0-rc1" command is 1.0.0-rc1-update2. So you need to run this command to install the final version:

dnvm install 1.0.0.-rc1-final

After this, you can run dnvm list command to check what version has been installed on your machine. And then you need to use dnvm use to choose the version. For example:

dnvm use 1.0.0-rc1-final -r clr -arch x86