Labels

Thursday, March 8, 2012

Unable to load DLL 'FileTracker.dll'

Find the file: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets

Locate the <GenerateResource> tag at Line 1835 and delete the attributes TrackFileAccess and TrackerLogDirectory


In the <PropertyGroup> section (without conditions) add:
<TrackFileAccess>false</TrackFileAccess>


Note that editing this file (Microsoft.Common.Targets) makes it where the file can no longer be serviced. Also, doing this turns off incremental build, which slows the build.
You can add an attribute to your project file instead <TrackFileAccess>false</TrackFileAccess> if you are ok with loosing the incremental build performance.

This issue is indicative of security programs being on the box which you special API's to watch file activity. The build process uses Tracker to watch file access during a build to use in subsequent builds so that the build can occur incrementally. By incremental, we mean that only the files that have changed will cause portions of the build to be re-done. This allows the minimum amount of work to be done when only minor changes are made to say, one file in a project.
The issue occurs when the security program has already used the API and Tracker attempts to do the same. The API only allows for a single watch, and hence the Tracker call fails giving the error shown above. (See top of this thread)
The better solution is to find an updated security program that does not use this type of mechanism.

No comments:

Post a Comment