9

I'm trying to build ASP.NET 5 beta 7 application on VSO. And I getting following error:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DNX.PackageManager' or one of its dependencies. The system cannot find the file specified.

File name: 'Microsoft.DNX.PackageManager'

I know about this issue: https://github.com/aspnet/Announcements/issues/51

So I tried to install latest WebTools using PowerShell script but "access denied".

Any ideas how to build beta7 app in VSO? Or just wait unit VSO build server will be updated with latest tools?

3 Answers 3

7

In order to build ASP.NET 5 beta 7 project successfully, the Microsoft ASP.NET and Web Tools 2015 (Beta7) – Visual Studio 2015 needs to be installed.

However, this web tool is not available on hosted build server, that is the reason why you get the "FileNotFoundException" error message (please check this link for the details what are installed on hosted build server: http://listofsoftwareontfshostedbuildserver.azurewebsites.net/). Additionally, you're not allowed to install any software to hosted build server, so, you get the "access denied" error message.

So, in order to build ASP.NET 5 beta 7 project successfully, instead of using hosted build server, you need to set up to use your own on-premise build controller. Check this link for the details: https://msdn.microsoft.com/library/ee330987

3
  • Haven't installed this, but can build my solution correctly on beta 7. The only thing I've done is dnvm upgrade, that installed beta 7. Installed VS2015 over a month ago
    – Vitaly
    Sep 8, 2015 at 10:41
  • 2
    @Vitaly, I know that you can build project successfully on your local machine, but can't have it built successfully with hosted build controller. Just as I mentioned above, no required software is available on hosted build server, nor you don't have permission to install. So, you can't build it successfully with hosted build controller, you need to set up your own build system. Sep 9, 2015 at 7:15
  • 2
    This is a poor workaround; VSO has been keeping up-to-date with betas up until this point. Is there anyway to set environment information to point dnu to the proper location of the library? Maybe something akin to binding redirects? Sep 16, 2015 at 18:41
6

This is a result of the tooling changes for Visual Studio 2015 and VSO not having the latest tools installed in its hosted build controller (specifically, Microsoft.Dnx.PackageManager doesn't exist and should actually be Microsoft.Dnx.Tooling). To get around this, besides hosting your own build controller, you can fall back to the command line tools dnu build and dnu publish:

dnu build "src\{YOUR.PROJECT.FOLDER}" --configuration "release"

dnu publish "src\{YOUR.PROJECT.FOLDER}" --configuration "release" --out "your\output\directory\to\publish\to" --runtime "dnx-clr-win-x86.1.0.0-beta7"

I have this mostly detailed on my blog here: Deploying ASP.NET 5 Beta 7 Through Visual Studio Online

This should only be a temporary issue, as one can only assume Microsoft will be updating their tooling. When that's complete, you should be able to go back to the normal Visual Studio build step.

2
  • 1
    Good find. I had to add a dnu restore "$PSScriptRoot\src" before dnu build as well to get mine to work
    – NPNelson
    Oct 7, 2015 at 13:16
  • If you have a script in a subfolder or if your current folder context isn't the same as your script, then that makes sense you'd have to add it. Good to note; thanks! Oct 8, 2015 at 14:21
0

Seems that you've renamed PackageManager incorreclty. Just find where you have reference to 'Microsoft.DNX.PackageManager' and change it to 'Microsoft.DNX.Tooling'

1
  • 2
    Locally build completed. I have searched through all source and project files: references not found. AFAIK it's tooling (msbuild) problem.
    – Andrey
    Sep 5, 2015 at 4:54

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.