Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DNX beta8-15530 : Could not load file or assembly 'Microsoft.DNX.PackageManager'

I have run this command in Package Manager Console to upgrade the dnx.

"dnvm upgrade -u default"

Once It's get update, I can see(C:\Users\Chandrasekar.dnx\runtimes) the new runtime version as mention below

"dnx-clr-win-x86.1.0.0-beta8-15530"  

I started creating new project in VS2015 --> ASPNET 5 web application it ends up with some errors.

enter image description here

In output window you can see the error "Could not load 'Microsoft.DNX.PackageManager'", according to this announcement it has been renamed to 'Microsoft.Dnx.Tooling' so my question is why the new DNX beta 8 version still depends on this removed or renamed DLL 'Microsoft.DNX.PackageManager'?

Output Window Error:

PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
C:\Users\Chandrasekar\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8-15530\bin\dnx.exe "C:\Users\Chandrasekar\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8-15530\bin\lib\Microsoft.DNX.PackageManager\Microsoft.DNX.PackageManager.dll" restore "C:\Users\Chandrasekar\Documents\Visual Studio 2015\Projects\DNX8\src\DNX8" -f "C:\Program Files (x86)\Microsoft Web Tools\DNU"
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'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.Load(AssemblyName assemblyName)
   at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, FrameworkName targetFramework)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, FrameworkName targetFramework)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, FrameworkName targetFramework)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Can you please help me to solve this issues? Do I need to update any dlls or software?

Tools: Microsoft Visual Studio Enterprise 2015 Version 14.0.23107.0

like image 781
Chandrasekar Kesavan Avatar asked Sep 01 '15 11:09

Chandrasekar Kesavan


2 Answers

You are not using the latest tooling version. Your version is probably 14.0.20711.0 while the latest is 14.0.20723.0.

20711 had a bug because it was trying to load Microsoft.DNX.PackageManager which is actually Microsoft.Dnx.Tooling .

Get the latest version: http://www.microsoft.com/en-us/download/details.aspx?id=48222

See this announcement.

like image 184
Victor Hurdugaci Avatar answered Oct 24 '22 01:10

Victor Hurdugaci


Let me make this stand out - I tend to forget. Here's Beta 8:

Microsoft ASP.NET and Web Tools 2015 (Beta8) – Visual Studio 2015

And a search for all of them - if the name doesn't change, RC1 will show up shortly ;)

Search results for Microsoft ASP.NET and Web Tools on Microsoft.com

like image 34
Eric Avatar answered Oct 24 '22 02:10

Eric