.net核心天蓝色部署失败:项目文件不存在 [英] .net core azure deployment failing: Project file does not exist

查看:164
本文介绍了.net核心天蓝色部署失败:项目文件不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Azure中设置了一个应用程序服务应用程序,可以在提交后部署到团队服务git存储库中。到目前为止,它一直运行良好,并且部署失败并显示以下信息:

I have an app-service app set up in Azure which is set to deploy upon commit into a team-services git repository. This has been working fine until now, and the deployment is failing with:

MSBUILD : error MSB1009: Project file does not exist.

但是,如果我将azure控制台和CD打开到我的项目目录,则可以看到该项目文件(asp.net核心.xproj)确实存在。我在部署日志的输出中的正确目录中知道它,表明正在还原软件包:

However, If I open the azure console and CD to my project directory I can see that the project file (an asp.net core .xproj) does indeed exist. I know its in the correct directory from the output in the deployment log, showing that the packages are being restored:

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
Restoring packages for D:\home\site\repository\IDPTest\src\IDPTest\project.json...
Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in D:\home\site\repository\IDPTest\src\IDPTest\project.json...
Committing restore...
Lock file has not changed. Skipping lock file write. Path: D:\home\site\repository\IDPTest\src\IDPTest\project.lock.json
D:\home\site\repository\IDPTest\src\IDPTest\project.json
Restore completed in 10549ms.
Restoring packages for D:\home\site\repository\IDPTest\src\IDPTest.MVCClient\project.json...
Restoring packages for tool 'BundlerMinifier.Core' in D:\home\site\repository\IDPTest\src\IDPTest.MVCClient\project.json...
Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in D:\home\site\repository\IDPTest\src\IDPTest.MVCClient\project.json...
Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in D:\home\site\repository\IDPTest\src\IDPTest.MVCClient\project.json...
Committing restore...
Lock file has not changed. Skipping lock file write. Path: D:\home\site\repository\IDPTest\src\IDPTest.MVCClient\project.lock.json
D:\home\site\repository\IDPTest\src\IDPTest.MVCClient\project.json
Restore completed in 7119ms.

NuGet Config files used:
    C:\DWASFiles\Sites\#1IDPTest\AppData\NuGet\NuGet.Config

Feeds used:
    https://api.nuget.org/v3/index.json
Microsoft (R) Build Engine version 15.1.0.0
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: D:\home\site\repository\IDPTest\src\IDPTest.MVCClient
Failed exitCode=1, command=dotnet publish "D:\home\site\repository\IDPTest\src\IDPTest.MVCClient" --output "D:\local\Temp\8d40eb8007743fd" --configuration Release
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\59.51109.2534\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd

有趣的是,我有两个应用程序服务应用程序指向同一解决方案中的不同项目。即使他们部署了不同的项目,突然他们都失败了,并显示了相同的错误消息...

Interestingly I have two app-service apps pointing at different projects in the same solution. Suddently they're both failing with the same error message even though they're deploying different projects...

任何帮助我们都很感激。

Any help much appreciated.

谢谢

编辑

我已经有一个解决方案根目录中的global.json(与.sln文件处于同一级别),但是它指向的是SDK的旧版本,因此我对此进行了更新,并且没有什么区别。然后,我尝试摆脱json文件中的 test项目,这也没有任何区别。仍然失败并出现相同的错误

I already had a global.json in my solution root (at the same level as my .sln file) but that was pointing at an older version of the SDK, so I updated this and it made no difference. I then tried getting rid of the 'test' project in the json file and that made no difference either. Still failing with the same error

推荐答案

显然,您需要指定SDK版本

Apparently you need to specify the SDK version explicitly in your global.json otherwise Kudu is using the latest which is now the preview3 one which is not compatible.

{
"projects": [ "src", "test" ],
"sdk": {
    "version": "1.0.0-preview2-1-003177"
    }
}

请注意,您的global.json文件应位于存储库的根目录中。

Be careful, you global.json file should live at the root of your repository.

详细信息: https://social.msdn.microsoft.com/Forums/zh-CN/2a301f82 -6a7a-4c03-ad4a-bd8714d72ba6 / aspnet-core-app的连续部署突然突然开始失败了?forum = windowsazurewebsitespreview& prof =必需

这篇关于.net核心天蓝色部署失败:项目文件不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆