【发布时间】:2020-06-13 15:11:06
【问题描述】:
我目前正在尝试使用 Azure DevOps Pipeline 为我的 ASP MVC Web 应用程序设置持续部署。每次签到都会触发此管道。每次管道运行时,它都会在构建步骤中失败。它显示的错误是:
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Nothing to do. None of the projects specified contain packages to restore.
D:\a\1\s\FantasyLeague\FantasyLeague.csproj(345,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\3.1.101\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\3.1.101\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk.
Build FAILED.
D:\a\1\s\FantasyLeague\FantasyLeague.csproj(345,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\3.1.101\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\3.1.101\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.47
就在管道中的此步骤之前,有一个恢复步骤应该恢复任何丢失的 NuGet 包,所以我不确定会发生什么,而且我是 Azure 的新手。任何帮助我克服这个障碍的帮助将不胜感激。谢谢!
【问题讨论】:
-
也许你的路径在构建管道中是错误的?
-
嗨,您尝试过以下解决方案吗?这个案子的进展如何?
标签: asp.net-mvc azure azure-devops