8

I got this error while trying to build my project on a buildAgent running as a service, does anyone have a solution for it?

 TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.exe" @C:\BuildAgent\temp\buildTmp\tmpfde187c5fd8a42299ab4d18e25e0c9fe.rsp". The operation identifier is not valid.

i tried a solution to a similar issue when building the project in command line (using "_IsNativeEnvironment" variable ) but it didn't work for me, also i need the solution to work on my local computer permanently.

Daniel
  • 174
  • 1
  • 6
  • This may be of interest to you: https://connect.microsoft.com/VisualStudio/feedback/details/800753/tracker-error-trk0002-failed-to-execute-command-for-building-x64-driver-resources – Arnav Borborah Aug 31 '16 at 14:35

5 Answers5

1

This error will happen with multiple tools when launching MSBuild from the command line:

  • CL.exe
  • cvtres.exe
  • Lib.exe
  • link.exe

adding them to the exclusion list of the active antivirus can fix some of the issues, but will not be enough with a modern antivirus.

An alternative is to deactivate Tracker.exe which is a tool that enable incremental builds. As it's not something you generally want on a build server, I found it safe to deactivate.

You can deactivate it by passing this parameter to msbuild: /p:TrackFileAccess=false

Matthieu
  • 4,605
  • 4
  • 40
  • 60
0

Windows Logs\Application in Windows Event Viewer may have clues about that.

In my case, it produce an event like

Activation context generation failed for "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe".Error in manifest or policy file "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe.Config" on line 0. Invalid Xml syntax.

I simply remove that .config file and it works.

aleph0
  • 60
  • 4
0

This happens me when the aggressive virus scanner in my org secretly detects these files as malicious and removes them in the background.

In my case, changing the rules of the virus scanner resolves this problem.

wrossmck
  • 369
  • 8
  • 21
0

This happened to me because I was sending the wrong "/p:VisualStudioVersion" to msbuild.

I upgrated to a newer version of vs but I didn't update the command line script that was building my project.

Changing the "/p:VisualStudioVersion" to the major version of vs that was actually installed on my machine fixed the problem.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
memory of a dream
  • 1,207
  • 3
  • 23
  • 32
-1

I had this troublesome error. I deleted my local TEMP folder completely and rebooted.

C:\Users\ [USER]\AppData\Local\Temp

Haglund
  • 1
  • 2