我在使用ASP.Net 5时遇到了很多问题,而且自从我将项目升级到Beta5后,我遇到了一个问题。错误如下:
严重级代码描述项目文件 错误CS0433类型'IHostingEnvironment'存在于'Microsoft.AspNet.Hosting.Abstractions,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'和'Microsoft.AspNet.Hosting.Interfaces,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'Uniti.Api.DNX 4.5.1 D:\ Alex \ Projects \ Uniti \ src \ Uniti.Api \ Startup.cs
我不知道如何解决此错误,我正在寻找一些帮助解决它。作为参考,我的project.json文件位于https://gist.github.com/mw2nukeboy/a65d3acb55f3c7799f6e
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"EntityFramework": "7.0.0-beta4",
"EntityFramework.SqlServer": "7.0.0-beta4",
"EntityFramework.Commands": "7.0.0-beta4",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta5",
"Microsoft.AspNet.Mvc": "6.0.0-beta5",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta5",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta5",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta5",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta5",
"Microsoft.AspNet.Identity": "3.0.0-beta5",
"Microsoft.Framework.Configuration": "1.0.0-beta5",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta5",
"Microsoft.AspNet.Authentication.OAuthBearer": "1.0.0-beta5"
},
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
"ef": "EntityFramework.Commands"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
]
}