.net核心Azure部署失败:项目文件不存在
我有一个在Azure中设置的应用服务应用,该应用设置为在提交到团队服务git存储库时部署。这一直工作正常直到如今,部署与失败:.net核心Azure部署失败:项目文件不存在
MSBUILD : error MSB1009: Project file does not exist.
不过,如果我打开蔚蓝的控制台和CD到我的项目目录,我可以看到,该项目文件(一个asp.net核心。 xproj)确实存在。我知道它在从部署日志输出正确的目录,显示正在恢复的包:
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
“
有趣的是我有同样的在不同的项目指向两个表观服务应用解决方案。Suddently他们都具有相同的错误消息失败,即使他们正在部署不同的项目...
任何帮助非常赞赏。
感谢
编辑
我已经在我的解决方案根global.json(在同一水平作为我的.sln文件),但指着一个老版本的SDK,所以我更新了这一点,它没有区别。然后我试着摆脱json文件中的'test'项目,这也没有任何区别。仍然出现同样的错误
显然你需要在你的global.json中明确地指定SDK版本,否则Kudu会使用最新的,它现在是预览版3不兼容的版本。
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-1-003177"
}
}
请注意,您的global.json文件应该存放在您的存储库的根目录下。
这对我没有帮助。我的存储库根目录中已经有一个global.json文件,所以我将其更新到最新的SDK版本,但是我仍然得到相同的部署错误 – LDJ
@LDJ如果您有一个repro,其中global.json不起作用,请采取通过https://github.com/projectkudu/kudu/issues/2230查看,并根据需要添加。 –
@LDJ我今天有同样的问题,它似乎只是一个在Azure上的错误,在这里报告:https://github.com/dotnet/cli/issues/4804尝试做dotnet构建没有路径,但在在运行命令之前正确的目录。 – jsgoupil
你提交支援地方公共?我刚刚也体验过这一点。 – ThomasArdal
@ThomasArdal不,不知道他们需要提交的地方。好的方式不仅仅是我。试图在几分钟前重新部署。同样的问题 – LDJ
也许在这里:https://portal.azure.com/#create/Microsoft.Support – ThomasArdal