MSBUILD error MSB3073 Exited with code 100

324 Views Asked by At

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?

1

There are 1 best solutions below

0
Jonathan Dodds On

The tf command line is not correct. When using the /map switch the server folder and local folder should be provided after the switch and before any other options.

Running the command

tf vc help workfold

Shows the following syntax

tf vc workfold /map serverfolder localfolder
               [/collection:TeamProjectCollectionUrl]
               [/workspace:workspacename]
               [/login:username,[password]]

Try the following instead. Note in addition to rearranging the options and arguments, I have also added quotes around the file paths.

<Exec Command="$(TfCommand) workfold /map &quot;$(SourceControlMainDirectory-Customizations)&quot; &quot;$(SolutionRoot-Customizations)&quot; /workspace:$(WorkSpaceName) /server:$(ServerName)"
  WorkingDirectory="$(SolutionRoot-Customizations)"
  ContinueOnError="false" />