2015-12-02 106 views
0

我剛剛安裝了一個新的空ASP.NET 5 WebApplication,並通過IISExpress運行應用程序時出現此錯誤。任何想法是什麼問題?DNX運行Web應用程序時出現錯誤,想法?

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.

這裏是我的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版本安裝

 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 

回答

2

beta6聲明依賴,但使用dnx beta7,你應該更新你的依賴持續穩定的釋放1.0.0-rc1-update1和用它。

還設置別名默認情況下1.0.0-rc1-update1

dnvm命令

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

dnvm use default 

Microsoft.AspNet.Server.IIS不存在rc1,通過Microsoft.AspNet.IISPlatformHandler

project.json更換

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

您也可能會卸載舊的測試版本並將dnvm更新爲最新的穩定版本。

相關問題