Adrian McCarthy
Adrian McCarthy

Reputation: 47962

Manifest Tool can't always write to DLL or EXE

Since upgrading to VS 2010 (from 2005), we've sporadically seen warnings like this:

Warning: mt.exe failed to write to <our DLL>; retrying.

Often mt retries once and succeeds. Occasionally it tries four times and then fails. It appears to be a timing problem.

Our first theory was that our anti-virus (which scans on access) was momentarily locking the DLL to scan it and that sometimes that would take longer than mt cared to wait. But the problem persists even if we disable the anti-virus.

Has anyone else seen this problem and successfully diagnosed it?

Upvotes: 0

Views: 641

Answers (1)

Adrian McCarthy
Adrian McCarthy

Reputation: 47962

Thanks to @Hans Passant's suggestion of trying Process Monitor, I discovered that there's nannyware scanning executables as the linker creates them.

In our case, it's Bit9 (parity.exe). There's a race condition between Bit9 trying to scan the binary after the linker creates it and the manifest tool trying to update it.

This is similar to what happens when you have anti-virus software that actively scans new files, but since we had disabled our anti-virus the problem was puzzling.

Upvotes: 2

Related Questions