Why won't MSBuild build a project with a dot in the name?

Try using an underscore as an escape character for the dot in the target parameter, e.g.

msbuild /target:Company_MainApplication /property:OutputPath="$pwd\out\Company.MainApplication"

Specify the target after the -target: switch in the format :. If the project name contains any of the characters %, $, @, ;, ., (, ), or ', replace them with an _ in the specified target name.

https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-build-specific-targets-in-solutions-by-using-msbuild-exe?view=vs-2019

Dan Nolan's answer and comments are correct. Just want to supplement the Microsoft documentation.

Tags:

Msbuild