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

时间:2018-01-22 10:43:27

标签: azure-devops

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

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

我可以看到问题是什么......解决方案文件在我的电脑上有项目路径...它存储在我的电脑上的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

1 个答案:

答案 0 :(得分:2)

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

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

enter image description here enter image description here