2

Now that native code can have assemblies (e.g. "unmanaged assembly") for side-by-side cache usage, I'm interested in changing the version of a DLL after it is built (as part of an incremental build auto-versioning scheme). I think I'm close using this commmand:

mt -updateresource:MyNewlyBuiltThing.dll;#2 -identity:"MyNewlyBuiltThing, version=5.5.0.1"

That command gives me the following error:

mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "MyNewlyBuiltThing.dll". Access is denied.

That command is executed from a command prompt with administrator privileges, and I have no anti-virus software on my development box (and the file does not have a read-only flag set).

Perhaps the problem is that I'm using the wrong name in the identity string. After all, when I load the embedded resource of the binary into Visual Studio, it shows a manifest that doesn't bother to mention its name - it only mentions the names of dependencies.

Anyway, I was just wondering if the mt.exe could be coaxed into giving me the post-build version-bumping of a non-managed assembly. Any insight of what I'm doing wrong? And if this is not possible, why?

starblue
  • 55,348
  • 14
  • 97
  • 151
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
  • Possibly related: [mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file ... Access is denied](https://stackoverflow.com/questions/3775406/mt-exe-general-error-c101008d-failed-to-write-the-updated-manifest-to-the-res) (similar but not identical error message) – starball Mar 17 '23 at 03:19

1 Answers1

2

If permissions issues have been ruled out:

Are you running on a FAT filesystem? There may be issues if not on NTFS. Also, several issues of this type are gone with the latest mt.exe, part of the "Microsoft Windows SDK for Windows 7 and .NET Framework 4", version 7.1 so you could try that.

Eugene Talagrand
  • 2,214
  • 1
  • 14
  • 16