Azure devops VSTS-解决方案文件中的生成定义错误

Azure devops VSTS-解决方案文件中的生成定义错误,azure-devops,Azure Devops,这可能是我做错的简单事情,因为我是VST新手 我已将现有的.NET网站项目上载到VSTS,当我在VSTS中运行生成定义时,解决方案文件中出现错误 我可以看到问题所在…解决方案文件中包含我电脑上项目的路径…它存储在我电脑上的inetpub/wwwroot/VSProjects中 有没有什么简单的东西我错过了,以避免这一点?可能有某种方法可以将.net网站上载到VST以避免此路径错误 谢谢你的帮助 以下是生成解决方案日志错误- 2018-01-19T16:34:14.3619604Z C:\Wi

这可能是我做错的简单事情,因为我是VST新手

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

我可以看到问题所在…解决方案文件中包含我电脑上项目的路径…它存储在我电脑上的inetpub/wwwroot/VSProjects中

有没有什么简单的东西我错过了,以避免这一点?可能有某种方法可以将.net网站上载到VST以避免此路径错误

谢谢你的帮助

以下是生成解决方案日志错误-

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构建任务中,您应该为您的网站项目指定
publishproj
文件,而不是在VS构建任务的解决方案选项中指定
sln

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


在解决方案文件中,存在对特定于您的环境的本地路径的硬编码引用。找到它,替换为相对路径(或者删除,如果不需要的话),你们会没事的。为什么?这解决了我的问题,但我真的很想知道,如果项目真的应该指向publishproj,为什么他们会默认构建.sln