简体   繁体   English

在Visual Studio 2015中部署.net核心AWS eb无法解决依赖关系

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

I have a .net core project in Visual Studio 2015 and I am trying to deploy to an AWS EB environment and I am getting about 400 errors about not being able to resolve dependencies, such as: project.json(19,66): error NU1001: The dependency EntityFramework.Core >= 7.0.0-rc1-final could not be resolved. 我在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.

I have tried to run the dotnet build command from my directory as well and I get the same error, so the error is within my project, and not with AWS. 我也尝试从目录运行dotnet build命令,并且遇到相同的错误,因此该错误在我的项目中,而不是在AWS中。

I believe it is something that has to do with my project.json or some some configuration in my project, but I do not know what. 我相信这与我的project.json或我的项目中的某些配置有关,但是我不知道是什么。

This is my project.json file, if it helps: 这是我的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": "----"
}

The project does run and can be deployed to a local directory and then uploaded via ftp to a iis webserver and it works correctly. 该项目确实可以运行,并且可以部署到本地目录,然后通过ftp上传到iis Web服务器,并且可以正常工作。

Any ideas? 有任何想法吗?

我通过从程序包管理器控制台运行dotnet restore命令来解决此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM