c# - 从 GitHub 部署到 Azure 错误

标签 c# asp.net azure asp.net-core dnx

大家。

我正在尝试使用 GitHub project (source) 将我的 Web 应用程序发布到 Azure作为 Azure 门户中的部署源。

项目已成功获取,但构建启动时,失败并显示“正在运行部署命令...”:

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
MSBuild auto-detection: using msbuild version '14.0' from 'D:\Program Files (x86)\MSBuild\14.0\bin'.
Restoring packages for D:\home\site\repository\src\MessyLabAdmin\project.json...
Package Ix-Async 1.2.5 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Ix-Async 1.2.5 supports:
  - net40 (.NETFramework,Version=v4.0)
  - net45 (.NETFramework,Version=v4.5)
  - portable-net45+win8+wp8 (.NETPortable,Version=v0.0,Profile=Profile78)
Package Remotion.Linq 2.0.1 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Remotion.Linq 2.0.1 supports:
  - net35 (.NETFramework,Version=v3.5)
  - net40 (.NETFramework,Version=v4.0)
  - net45 (.NETFramework,Version=v4.5)
  - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
Package Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 supports:
  - net45 (.NETFramework,Version=v4.5)
  - portable-net45+win8 (.NETPortable,Version=v0.0,Profile=Profile7)
Package Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 supports:
  - net45 (.NETFramework,Version=v4.5)
  - portable-net45+win8 (.NETPortable,Version=v0.0,Profile=Profile7)
One or more packages are incompatible with DNXCore,Version=v5.0.
Committing restore...
Writing lock file to disk. Path:
D:\home\site\repository\src\MessyLabAdmin\project.lock.json
D:\home\site\repository\src\MessyLabAdmin\MessyLabAdmin.xproj
Restore failed in 13568ms.

使用 Visual Studio 2015,项目在本地环境中运行完全正常。

最佳答案

我在您的项目中看到了对 RC1 的引用。 RC2 刚刚在 5 月中旬发布,所以我建议您继续使用 RC2,因为您在 RC2 发布后立即发布了这个问题。

至于部署到 Azure,以下是 ASP .NET 开发博客当前关于部署到 Azure 的内容:

Can I use RC2 with Azure Web Applications?

We are rolling the RC2 out to the Azure App Services and expect it to become available later this week. Keep an eye on the Azure Blog for an announcement when it is available.

来源:https://blogs.msdn.microsoft.com/webdev/2016/05/16/announcing-asp-net-core-rc2/

如果您已经在 RC1 中完成了大量工作,这里有从 RC1 迁移到 RC2 的指南:

希望有帮助!

关于c# - 从 GitHub 部署到 Azure 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37296198/

相关文章:

c# - AutoResetEvent 和 Mutex 有什么区别

javascript - 如何设置文本框的货币格式?

javascript - 我应该在我的 WIN7 IE9 机器上从 MSXML4 升级还是降级

azure - 有没有办法为 Azure 网站指定机器 key ,而无需在 web.config 中指定它?

c# - WebGui 中的 ShowDialog 不等待响应

c# - 进程不接受参数

与 .AsInputStream() 转换流一起使用时的 C# DataReader 问题

c# - 使用共享托管创建定时事件?

azure - 在 Bicep 中创建 VNet、子网和应用程序网关

azure - 避免从函数应用程序中记录应用程序见解中的严重性级别 0