.net core aws eb deploy in Visual Studio 2015 无法解析依赖关系

.net core aws eb deploy in Visual Studio 2015 cannot resolve dependency

我在 Visual Studio 2015 年有一个 .net 核心项目,我正在尝试部署到 AWS EB 环境,我收到大约 400 个关于无法解析依赖项的错误,例如:project.json(19,66): error NU1001: The dependency EntityFramework.Core >= 7.0.0-rc1-final could not be resolved.

我也尝试从我的目录中 运行 dotnet build 命令,我得到了同样的错误,所以错误是在我的项目中,而不是 AWS。

我认为这与我的 project.json 或项目中的某些配置有关,但我不知道是什么。

这是我的 project.json 文件,如果对您有帮助:

{
  "version": "1.0.0-*",
  "webroot":  "wwwroot",
  "compilationOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta7",
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
    "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
    "Microsoft.AspNet.Mvc.ViewFeatures": "6.0.0-rc1-final",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
    "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
    "Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
    "Microsoft.AspNet.Session": "1.0.0-rc1-final",
    "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
    "EntityFramework.MicrosoftSqlServer.Design": "7.0.0-rc1-final",
    "EntityFramework.Commands": "7.0.0-rc1-final",
    "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-final",
    "Microsoft.Framework.Configuration": "1.0.0-beta8",
    "Microsoft.Framework.ConfigurationModel": "1.0.0-beta4",
    "Microsoft.Framework.ConfigurationModel.UserSecrets": "1.0.0-beta4",
    "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc1-final",
    "Microsoft.Dnx.Runtime": "1.0.0-rc1-final",
    "MimeKit": "1.3.0-beta7",
    "MailKit": "1.3.0-beta7",
    "Google.Apis.Auth": "1.11.1"
  },

  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel",
    "ef": "EntityFramework.Commands"
  },

  "frameworks": {
    "dnx451": { }
  },

  "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components"
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc",
    "bower_components"
  ],
  "userSecretsId": "----"
}

该项目 运行 并且可以部署到本地目录,然后通过 ftp 上传到 iis 网络服务器并且它工作正常。

有什么想法吗?

我通过 运行 我的包管理器控制台中的 dotnet restore 命令修复了这个问题