title: c# Embed manifest file within .exe using mt.exe v1.0.0.0
body: <p>I have a legacy console application made in visual studio .NET 2003.
  I am trying to embed without success a manifest file within .exe generated when building because I want to avoid UAC in windows 7 ultimate to popup when my app launches. </p>
  
  <p>So my manifest file is below which is called MyTestApp.exe.manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"&gt;
    &lt;assemblyIdentity version="1.0.0.0"
       processorArchitecture="X86"
       name="IsUserAdmin"
       type="win32"/&gt; 
    &lt;description&gt;SDPUpdater for ServiDirPlus&lt;/description&gt;
    &lt;!-- Identify the application security requirements. --&gt;
    &lt;trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"&gt;
      &lt;security&gt;
        &lt;requestedPrivileges&gt;
          &lt;requestedExecutionLevel
            level="requireAdministrator"
            uiAccess="false"/&gt;
        &lt;/requestedPrivileges&gt;
      &lt;/security&gt;
    &lt;/trustInfo&gt;
  &lt;/assembly&gt;
  </code></pre>
  
  <p>Then within Visual Studio .NET 2003, in post-build action I write following command:</p>
  
  <p>"C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\Tools\Bin\winnt\mt.exe" -manifest "$(ProjectDir)$(TargetFileName).manifest"</p>
  
  <p>taken into account that:</p>
  
  <pre><code>$(ProjectDir) : C:\MyProjects\ConsoleApps\MyTestApp\
  $(TargetFileName) : MyTestApp.exe
  </code></pre>
  
  <p>My manifest file MyTestApp.exe.manifest is in C:\MyProjects\ConsoleApps\MyTestApp\</p>
  
  <p>But below error appears:</p>
  
  <pre><code>Performing Post-Build Event...
  Microsoft (R) Side-By-Side Manifest Tool 1.0.0.0
  Copyright (C) Microsoft Corporation 2000-2001.  All Rights Reserved.
  
  Nothing to do!
  Modes of operation:
     -hashupdate         Update hashes of member files
     -makecdfs           Generate CDF files to make catalogs
     -verbose            Disply piles of debugging information
  
  Modifiers:
     -manifest &lt;foo.man&gt; The name of the manifest to work with
  
  Normal usage:   mt.exe -hashupdate -makecdfs -manifest foo.man
  
  Project error: A tool returned an error code from the build event
  
  Post-Build Event failed
  </code></pre>
  
  <p>I think I have to indicate to mt.exe that my manifest file must be embed within MyTestApp.exe but I do not know how because mt.exe v1.0.0.0 only has 1 modifier (manifest), it does not provide any way to indicate my MyTestApp.exe file.</p>