DNX运行Web应用程序时出现错误,想法?
我刚刚安装了一个新的空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
你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更新为最新的稳定版本。