azure-devops - VSTS - 解决方案文件中的构建定义错误

标签 azure-devops

这可能是一些简单的事情,因为我是 VSTS 的新手,所以我做错了。

我已将现有的 .NET 网站项目上传到 VSTS,当我在 VSTS 中运行生成定义时,解决方案文件中出现错误。

我可以看到问题是什么......解决方案文件中包含我的 PC 上的项目路径......它存储在我的 PC 上的 inetpub/wwwroot/VSProjects 中。

我是否缺少一些简单的东西来避免这种情况?可能应该通过某种方式将 .net 网站上传到 vsts 以避免出现此路径错误?

感谢您的帮助...

这是构建解决方案日志错误 -

2018-01-19T16:34:14.3619604Z   C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /PropertyRegister -p ..\..\..\..\..\..\inetpub\wwwroot\VSProjects\PropertyRegister\ -u -f PrecompiledWeb\PropertyRegister\ 
2018-01-19T16:34:16.1411730Z ##[error]ASPNETCOMPILER(0,0): Error 1003: The directory 'd:\inetpub\wwwroot\VSProjects\PropertyRegister\' doesn't exist.
2018-01-19T16:34:16.1419278Z ASPNETCOMPILER : error 1003: The directory 'd:\inetpub\wwwroot\VSProjects\PropertyRegister\' doesn't exist. [d:\a\3\s\PropertyRegister\PropertyRegister.metaproj]
2018-01-19T16:34:16.1806460Z Done Building Project "d:\a\3\s\PropertyRegister\PropertyRegister.metaproj" (default targets) -- FAILED.
2018-01-19T16:34:16.1818301Z Done Building Project "d:\a\3\s\PropertyRegister\PropertyRegister.sln" (default targets) -- FAILED.
2018-01-19T16:34:16.1837158Z 
2018-01-19T16:34:16.1837587Z Build FAILED.
2018-01-19T16:34:16.1873374Z 
2018-01-19T16:34:16.1882800Z "d:\a\3\s\PropertyRegister\PropertyRegister.sln" (default target) (1) ->
2018-01-19T16:34:16.1884216Z (ValidateProjects target) ->
2018-01-19T16:34:16.1885795Z   d:\a\3\s\PropertyRegister\PropertyRegister.sln.metaproj : warning MSB4121: The project configuration for project "PropertyRegister" was not specified in the solution file for the solution configuration "Release|Any CPU". [d:\a\3\s\PropertyRegister\PropertyRegister.sln]
2018-01-19T16:34:16.1886267Z

最佳答案

在 VS Build 任务中,您应该在 VS Build 任务的解决方案选项中为您的网站项目指定 publishproj 文件,而不是 sln 文件 .

您可以指定 publishproj 文件的详细相对路径或使用通配符来匹配您要构建的网站项目,如下例所示:

enter image description here enter image description here

关于azure-devops - VSTS - 解决方案文件中的构建定义错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48379708/

相关文章:

Azure DevOps : Selecting which variable group to use at the stage level

azure - 如何将 Azure WebJob 部署为自动 VSTS 部署的一部分

azure-devops - 在 Azure DevOps Wiki 中添加图像

Azure DevOps 项目 SharePoint 门户 : Document Repository

visual-studio - 管理持续部署到 Azure 网站的源代码控制应用程序中的连接字符串

azure - 将自定义 exe 上传到 Azure Devops 管道

c# - Azure Pipeline (DotNetCoreCLI@2) 将 DLL 包含到 nuget 中

azure - 使用 API 管理服务及其 API 的 ARM 模板进行部署时出现问题

git - 使用 Visual Studio 2019 将更改推送到子存储库

notifications - 是否有关于从迭代中移出的用户故事的报告或通知?