【发布时间】:2018-06-19 23:09:54
【问题描述】:
我有一个 UI 可以在解决方案上调用 msbuild,并且我希望能够选中 UI 中的一些框以指定要在解决方案中构建哪些项目。我正在使用这样的 msbuild:
msbuild mysolution.sln /t:"proj1" /t:"proj2"
只要项目是字母数字,一切正常。但是当我得到一个名称中有句点的项目时:
msbuild mysolution.sln /t:"ABC.XYZ"
我收到这样的错误(用...跳过一些不相关的细节):
Microsoft (R) Build Engine version 14.0.25420.1
...
Project "C:\...\mysolution.sln" on node 1 (ABC.XYZ target(s))
ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU"
C:\...\mysolution.sln.metaproj : error MSB4057: The target "ABC.XYZ" does not exist in the project. [c:\...\mysolution.sln]
显然在这个例子中,项目 ABC.XYZ 确实存在于 mysolution.sln 中。
这只是一个没有解决方法的错误吗?或者这是预期的行为,我需要以某种方式修改名称以便 msbuild 了解我发送的内容?
【问题讨论】:
标签: msbuild