Remove trailing backslash from msbuild batching Directory property
问题 I'm trying to get an exec task inside an msbuild script to work and have found a very annoying issue. The exec command is sweet except that the process I'm running (Ncover.Console.exe) can't handle a backslash at the end of a directory name. To illustrate with a snipped example, the following works: <exec command="NCover.Console.exe nunit-console.exe some.dll [snip] //w c:\out" /> But this fails (note the slash at the end of "c:\out"): <exec command="NCover.Console.exe nunit-console.exe some