user1570634
user1570634

Reputation: 81

DNX Error when running webapplication, ideas?

i just installed a new empty ASP.NET 5 WebApplication and got this error when running the app via IISExpress. Any idea what the problem is?

Could not load file or assembly 'dnx.clr.managed' or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'dnx.clr.managed' or one of its dependencies. The system cannot find the file specified. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Assembly Load Trace: The following information can be helpful to determine why the assembly 'dnx.clr.managed' could not be loaded. === Pre-bind state information === LOG: DisplayName = dnx.clr.managed (Partial) WRN: Partial binding information was supplied for an assembly: WRN: Assembly Name: dnx.clr.managed | Domain ID: 3 WRN: A partial bind occurs when only part of the assembly display name is provided. WRN: This might result in the binder loading an incorrect assembly. WRN: It is recommended to provide a fully specified textual identity for the assembly, WRN: that consists of the simple name, version, culture, and public key token. WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue. LOG: Appbase = file:///C:/Users/Admin/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta7/bin LOG: Initial PrivatePath = NULL Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Configuration file C:\Program Files (x86)\IIS Express\iisexpress.exe.config does not exist. LOG: No application configuration file found. LOG: Using host configuration file: C:\Users\Admin\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///C:/Users/Admin/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta7/bin/dnx.clr.managed.DLL. LOG: Attempting download of new URL file:///C:/Users/Admin/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta7/bin/dnx.clr.managed/dnx.clr.managed.DLL. LOG: Attempting download of new URL file:///C:/Users/Admin/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta7/bin/dnx.clr.managed.EXE. LOG: Attempting download of new URL file:///C:/Users/Admin/.dnx/runtimes/dnx-clr-win-x86.1.0.0-beta7/bin/dnx.clr.managed/dnx.clr.managed.EXE.

Here is my project.json

{
  "webroot": "wwwroot",
  "version": "1.0.0-*",

  "dependencies": {
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta6",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta6"
  },

  "commands": {
    "web": "Microsoft.AspNet.Hosting --config hosting.ini"
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": { }
  },

  "publishExclude": [
    "node_modules",
    "bower_components",
    "**.xproj",
    "**.user",
    "**.vspscc"
  ],
  "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components"
  ]
}

Dnx versions installed

       1.0.0-beta5       clr     x64          C:\Users\Admin\.dnx\runtimes
       1.0.0-beta5       clr     x86          C:\Users\Admin\.dnx\runtimes
       1.0.0-beta5       coreclr x64          C:\Users\Admin\.dnx\runtimes
       1.0.0-beta5       coreclr x86          C:\Users\Admin\.dnx\runtimes
       1.0.0-beta6       clr     x64          C:\Users\Admin\.dnx\runtimes
       1.0.0-beta6       clr     x86          C:\Users\Admin\.dnx\runtimes
       1.0.0-beta6       coreclr x64          C:\Users\Admin\.dnx\runtimes
       1.0.0-beta6       coreclr x86          C:\Users\Admin\.dnx\runtimes
  *    1.0.0-beta7       clr     x86          C:\Users\Admin\.dnx\runtimes
       1.0.0-rc1-update1 clr     x86          C:\Users\Admin\.dnx\runtimes
       1.0.0-rc1-update1 coreclr x86          C:\Users\Admin\.dnx\runtimes
       1.0.0-rc2-16249   clr     x86          C:\Users\Admin\.dnx\runtimes 

Upvotes: 0

Views: 622

Answers (1)

agua from mars
agua from mars

Reputation: 17444

You declare dependencies on beta6 but use dnx beta7, you should update your dependencies to last stable release 1.0.0-rc1-update1 and use it.

Set also the alias default on 1.0.0-rc1-update1:

dnvm commands

 dnvm alias default 1.0.0-rc1-update1 -a x86 -r clr

 dnvm use default

Microsoft.AspNet.Server.IIS doesn't exist for rc1, replace it by Microsoft.AspNet.IISPlatformHandler

project.json

"dependencies": {
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final"
},

You might also uninstall old beta versions and update dnvm to the latest stable version.

Upvotes: 2

Related Questions