将 ASP.net Core 2.0 部署到 Azure

Deploying ASP.net Core 2.0 to Azure(将 ASP.net Core 2.0 部署到 Azure)
本文介绍了将 ASP.net Core 2.0 部署到 Azure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已通过以下步骤将 ASP.net Core 1.1 应用升级到 ASP.net Core 2.0:

I have upgraded an ASP.net Core 1.1 app to ASP.net Core 2.0 with the following steps:

  • 将目标框架更改为 2.0
  • 升级了所有 Nugget 包

现在我从 git 的自动部署运行并说它成功但应用程序没有运行.我收到以下错误:

Now my auto deployment from git runs and says it is successful but the app does not run. I get the following error:

HTTP Error 502.5 - Process Failure

我还添加了一个单独的 Web 应用程序部署槽,并尝试在那里部署它,但仍然得到相同的结果.我也尝试过手动将其部署到缓慢且没有变化.

I also added a separate web app deployment slot and tried deploying it there and still get the same result. I have also tried deploying it manually to the slow and no change.

推荐答案

我必须将以下内容添加到解决方案中的所有 .csproj 文件

I had to add the following to all the .csproj files in the solution

<ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
  </ItemGroup>

这篇关于将 ASP.net Core 2.0 部署到 Azure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)
Bind multiple parameters from route and body to a model in ASP.NET Core(在ASP.NET Core中将路由和主体中的多个参数绑定到一个模型)
Custom model binding in AspNet Core WebApi?(AspNet Core WebApi中的自定义模型绑定?)
How to minify in .net core mvc view?(如何在.Net核心MVC视图中缩小?)