I have a UI to call msbuild on a solution, and I want to be able to check some boxes in a UI to specify which projects to build in the solution. I'm using msbuild like this:
msbuild mysolution.sln /t:"proj1" /t:"proj2" Everything works fine as long as the projects are alphanumeric. But when I get a project which has a period in the name:
msbuild mysolution.sln /t:"ABC.XYZ" I get an error like this (skipping some irrelevant details with ...):
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] Obviously in this example, project ABC.XYZ does exist in mysolution.sln.
Is this just a bug with no workaround? Or is it expected behavior, and I need to mangle the name in some way for msbuild to understand what I'm sending?