VS 2015将无法编译 - “依赖无法解决”

时间:2015-07-27 02:34:06

标签: c# asp.net entity-framework visual-studio dnx

我使用Visual Studio RC构建了一个ASP.NET MVC应用程序,现在已经卸载了该工具并安装了Visual Studio 2015 RTM。每次我尝试通过web.app构建应用Ctrl-F5时,都会抛出此错误:

  

Dependency EntityFramework> = 7.0.0-beta4无法解析web.app

当我双击错误时,它会打开我的project.json文件。

{
    /* Click to learn more about project.json  http://go.microsoft.com/fwlink/?LinkID=517074 */
    "webroot": "wwwroot",
    "userSecretsId": "***************************************",
    "version": "1.0.0-*",

    "dependencies": {
        "EntityFramework.SqlServer": "7.0.0-beta4",
        "EntityFramework.Commands": "7.0.0-beta4",
        "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta4",
        "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta4",
        "Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta4",
        "Microsoft.AspNet.Authentication.Google": "1.0.0-beta4",
        "Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta4",
        "Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta4",
        "Microsoft.AspNet.Diagnostics": "1.0.0-beta4",
        "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta4",
        "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta4",
        "Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
        "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
        "Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
        "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta4",
        "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
        "Microsoft.Framework.ConfigurationModel.UserSecrets": "1.0.0-beta4",
        "Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4",
        "Microsoft.Framework.Logging": "1.0.0-beta4",
        "Microsoft.Framework.Logging.Console": "1.0.0-beta4",
        "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta4",
        "Microsoft.AspNet.Mvc": "6.0.0-beta4",
        "Microsoft.Net.Http.Server": "1.0.0-beta4"
    },

    "commands": {
        "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
        "gen": "Microsoft.Framework.CodeGeneration",
        "ef": "EntityFramework.Commands"
    },

    "frameworks": {
        "dnx451": {
            "frameworkAssemblies": {
                "System.Net": "4.0.0.0",
                "System.Web": "4.0.0.0",
                "System.Web.Extensions": "4.0.0.0"
            }
        }
    },

    "exclude": [
        "wwwroot",
        "node_modules",
        "bower_components"
    ],

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

    "scripts": {
        "postrestore": [ "npm install", "bower install" ],
        "prepare": [ "grunt bower:install" ]
    }
}

我将PowerShell更新为4.0,然后使用此命令更新了我的DNX:

  

PM> Install-Package EntityFramework.SqlServer -Pre

安装了EntityFramework.SqlServer 7.0.0-beta5。没有差异。我正在失去理智,需要用Visual Studio完成一些工作。有人有任何答案吗?

我甚至尝试卸载RTM并安装RC,但它说我的应用程序现在与该版本的Visual Studio不兼容。所以我似乎无法回到RC。

0 个答案:

没有答案