I am using msbuild to build setup and in there when following line of code hit there will be an error
<!-- Add mappings to the workspace -->
<Exec Command="$(TfCommand) workfold /map /workspace:$(WorkSpaceName) /server:$(ServerName) $(SourceControlMainDirectory-Customizations) $(SolutionRoot-Customizations)" WorkingDirectory="$(SolutionRoot-Customizations)" ContinueOnError="false" />
Error is
"D:\Mubasher Net Plus - Asia\Branches\FeaturesDevelopment_R5\Build\Scripts\IndonesiaDT5-XOPO\Build-IndonesiaDT.proj" (default target) (1) ->
(Get-Latest target) -> D:\Mubasher Net Plus - Asia\Branches\FeaturesDevelopment_R5\Build\Scripts\Get-Latest-IndonesiaDT.proj(52,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe " workfold /map /workspace:FeaturesDevelopment_R5 /server:http://192.0.0.0:8080/tfs/defaultcollection $/Mubasher Net Plus - Asia\Branches\FeaturesDevelopment_R5\Customizations" D:\MS_BUILD\MTECH\Branches\Fe aturesDevelopment_R5\Customizations" exited with code 100. [D:\Mubasher Net Plus - Asia\Branches\FeaturesDevelopment_R5\Build\Scripts\IndonesiaDT5-XOPO\Build-IndonesiaDT.proj]
<SolutionRoot-Customizations>D:\MS_BUILD\MTECH\Branches\FeaturesDevelopment_R5\Customizations</SolutionRoot-Customizations>
<SourceControlMainDirectory-Customizations>$/Mubasher Net Plus - Asia\Branches\FeaturesDevelopment_R5\Customizations"</SourceControlMainDirectory-Customizations>
<ServerName>http://192.0.0.0:8080/tfs/defaultcollection</ServerName>
<TfCommand>"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe"</TfCommand>
<WorkspaceName>FeaturesDevelopment_R5</WorkspaceName>
How to overcome this?
The
tfcommand line is not correct. When using the/mapswitch the server folder and local folder should be provided after the switch and before any other options.Running the command
Shows the following syntax
Try the following instead. Note in addition to rearranging the options and arguments, I have also added quotes around the file paths.