Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress GUID Warnings as a Result of mt.exe Post-Build Event

Within a large, pre-existing codebase, I have several *.dll's which I need to register with COM interop.

These manifest registrations are being performed as post-build events using mt.exe in the following manner:

mt.exe -manifest "$(ProjectDir)myProjectManifestFragment.xml" -nodependency -managedassemblyname:"$(TargetFileName)" -out:"$(TargetName).manifest" -outputresource:"$(TargetFileName)";#2

Explicit GUIDs are not necessary in this instance, yet, naturally, mt.exe generates cluttering warnings of the following nature:

mt.exe : genman warning G81010014: Explicit guid not defined for type myInternalType

My question is: How do I suppress these warnings without explicitly defining GUIDs?

Note, I do not want to take the post-build event and redirect the output (a la > NUL), as I would still like to receive error notifications. There is a method of suppressing only the stderrs from mt.exe, but I merely wish to suppress this warning. I'd even be happy with suppressing all warnings generated by mt.exe (doesn't specifically have to be G81010014).

mt.exe's documentation on MSDN appears to only show a verbose flag, yet no manner of changing verbosity level to a "terse" mode, in which warnings would be suppressed. Within Visual Studio 2010, there is apparently a manner in which to suppress specific warnings, yet I cannot ascertain how this can apply specific to post-build events, let alone warnings generated only by mt.exe.

Thank you in advance! This is actually my first post on Stack Overflow :) Let me know if I need to be more specific, broad, etc... ^_^

Cheers!

-Kadaj

like image 599
Kadaj Nakamura Avatar asked Nov 12 '22 21:11

Kadaj Nakamura


1 Answers

I've got the same problem (VS 2010). Redirecting to NUL is all I could think of.

You could always do a multi-command line or a batch file and test for error:

MT.EXE  etc...
if NOT %ERRORLEVEL%==0 ...
like image 98
Pierre Avatar answered Nov 15 '22 12:11

Pierre