从 git 部署到 Azure:'No Deployable Projects'

Deploying to Azure from git: 'No Deployable Projects'

根据文档,可以通过更新 git 存储库来部署到 Azure。

我尝试了演练 here

我创建了 this github repository,然后从 Visual Studio 模板生成了一个 ASP.NET MVC 项目。

查看日志,Azure 检测到签入,但提供了以下无用消息:

Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --basic'.

Generating deployment script for Web Site

Generated deployment script files

Found solution 'D:\home\site\repository\kudu-deployment-test.sln' with no deployable projects. Deploying files instead.

为什么我的开箱即用 ASP.NET 项目不是 'deployable project'?

我该怎么做才能修复它?

您的 GitHub 存储库中当前存在的解决方案文件不包含错误提示的任何项目信息。我下载了您的存储库副本并在 Visual Studio 2015 年打开了解决方案,但它没有任何关联的项目。

https://github.com/AndrewShepherd/kudu-deployment-test/blob/master/kudu-deployment-test.sln

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Global
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal

从存储库中的文件添加现有项目后,这就是我更新后的解决方案文件的样子:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "kudu-deployment-test", "kudu-deployment-test\kudu-deployment-test.csproj", "{AA0F0FD5-559E-4125-87A7-F7C3173DE079}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {AA0F0FD5-559E-4125-87A7-F7C3173DE079}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {AA0F0FD5-559E-4125-87A7-F7C3173DE079}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {AA0F0FD5-559E-4125-87A7-F7C3173DE079}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {AA0F0FD5-559E-4125-87A7-F7C3173DE079}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal

如果您的项目在 Visual Studio 中正确可见,我将确保保存您的解决方案文件并将更新版本推送到您的存储库。由于您已经从 GitHub 设置了持续部署,一旦您修复了解决方案文件,您的项目应该会自动正确部署。