无法安装Microsoft.AspNet.Session

时间:2015-07-30 11:29:34

标签: asp.net-core asp.net-core-mvc

一个简单的问题:为什么我不能在我的项目中安装Microsoft.AspNet.Session

我的project.json文件:

{
  "webroot": "wwwroot",
  "userSecretsId": "aspnet5-WNCT.Web-f78556bf-e147-4ae1-befa-681a6422744f",
  "version": "1.0.0-*",

  "dependencies": {
    "EntityFramework.Commands": "7.0.0-beta5",
    "EntityFramework.SqlServer": "7.0.0-beta5",
    "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta5",
    "Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta5",
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta5",
    "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta5",
    "Microsoft.AspNet.Identity": "3.0.0-beta5",
    "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta5",
    "Microsoft.AspNet.Mvc": "6.0.0-beta5",
    "Microsoft.AspNet.Mvc.TagHelpers": "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.Tooling.Razor": "1.0.0-beta5",
    "Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta5",
    "Microsoft.Framework.Configuration.Json": "1.0.0-beta5",
    "Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta5",
    "Microsoft.Framework.Logging": "1.0.0-beta5",
    "Microsoft.Framework.Logging.Console": "1.0.0-beta5",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta5",
    "Microsoft.AspNet.Session" : "1.0.0-beta6",
    "WNCT.BL": "1.0.0-*",
    "WNCT.Data": "1.0.0-*",
    "WNCT.EF": "1.0.0-*"
  },

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

  "frameworks": {
    "dnx451": {
      "dependencies": {
        "HtmlAgilityPack": "1.0.0-*",
        "LDAP": "1.0.0-*"
      }
    }
  },

    "exclude": [
        "wwwroot",
        "node_modules",
        "bower_components"
    ],
    "publishExclude": [
        "node_modules",
        "bower_components",
        "**.xproj",
        "**.user",
        "**.vspscc"
    ],
    "scripts": {
        "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
    }
}

2 个答案:

答案 0 :(得分:2)

看起来您使用的是{6}版本的Microsoft.AspNet.Session以及其他所有版本的Beta 5版本。

Beta 6今天刚刚问世。请考虑按照announcement中的说明将所有内容更新为Beta 6,或者仅回退到Beta 5。

答案 1 :(得分:1)

我添加了dnxcore50并且在恢复之后我得到了一堆核心错误但是在删除核心之后一切都正确恢复了。很奇怪,但我想从测试版中可以理解。