title: Issue applying a manifest to a wix generated msi using mt.exe
body: <p>I'm trying to apply a manifest to a WiX generated msi to create an exe that will immediately display a UAC prompt upon running the installer.  Unfortunately I'm getting the following error upon building my installer project:</p>
  
  <pre><code>Values of attribute "level" not equal in different manifest snippets. mt.exe
  </code></pre>
  
  <p>I need to elevate the execution to allow custom actions that run during InstallUISequence to have admin privileges (to look up IIS app pools and web apps).  I'm using Visual Studio 2012 on Windows 8.</p>
  
  <p>Below is my wixproj file which shows my bootstrapper setup:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;PropertyGroup&gt;
      &lt;Configuration Condition=" '$(Configuration)' == '' "&gt;Debug&lt;/Configuration&gt;
      &lt;Platform Condition=" '$(Platform)' == '' "&gt;x86&lt;/Platform&gt;
      &lt;ProductVersion&gt;3.5&lt;/ProductVersion&gt;
      &lt;ProjectGuid&gt;{d51029e8-4a79-4812-96e1-bf6b600d5d34}&lt;/ProjectGuid&gt;
      &lt;SchemaVersion&gt;2.0&lt;/SchemaVersion&gt;
      &lt;OutputName&gt;WixInstallerExampleWebInstaller&lt;/OutputName&gt;
      &lt;OutputType&gt;Package&lt;/OutputType&gt;
      &lt;WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' "&gt;$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets&lt;/WixTargetsPath&gt;
      &lt;WixTargetsPath Condition=" '$(WixTargetsPath)' == '' "&gt;$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets&lt;/WixTargetsPath&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "&gt;
      &lt;OutputPath&gt;bin\$(Configuration)\&lt;/OutputPath&gt;
      &lt;IntermediateOutputPath&gt;obj\$(Configuration)\&lt;/IntermediateOutputPath&gt;
      &lt;DefineConstants&gt;Debug&lt;/DefineConstants&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "&gt;
      &lt;OutputPath&gt;bin\$(Configuration)\&lt;/OutputPath&gt;
      &lt;IntermediateOutputPath&gt;obj\$(Configuration)\&lt;/IntermediateOutputPath&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Compile Include="IisSettingsDlg.wxs" /&gt;
      &lt;Compile Include="Product.wxs" /&gt;
      &lt;Compile Include="UserInterface.wxs" /&gt;
      &lt;Compile Include="WixInstallerExampleWeb.wxs" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;ProjectReference Include="..\WixInstallerExampleWeb\WixInstallerExampleWeb.csproj"&gt;
        &lt;Name&gt;WixInstallerExampleWeb&lt;/Name&gt;
        &lt;Project&gt;{d23a374d-764c-40ba-b566-4d7c55319236}&lt;/Project&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;DoNotHarvest&gt;True&lt;/DoNotHarvest&gt;
        &lt;RefProjectOutputGroups&gt;Binaries;Content;Satellites&lt;/RefProjectOutputGroups&gt;
        &lt;RefTargetDir&gt;INSTALLLOCATION&lt;/RefTargetDir&gt;
        &lt;PackageThisProject&gt;True&lt;/PackageThisProject&gt;
      &lt;/ProjectReference&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;WixExtension Include="WixUtilExtension"&gt;
        &lt;HintPath&gt;$(WixExtDir)\WixUtilExtension.dll&lt;/HintPath&gt;
        &lt;Name&gt;WixUtilExtension&lt;/Name&gt;
      &lt;/WixExtension&gt;
      &lt;WixExtension Include="WixNetFxExtension"&gt;
        &lt;HintPath&gt;$(WixExtDir)\WixNetFxExtension.dll&lt;/HintPath&gt;
        &lt;Name&gt;WixNetFxExtension&lt;/Name&gt;
      &lt;/WixExtension&gt;
      &lt;WixExtension Include="WixIIsExtension"&gt;
        &lt;HintPath&gt;$(WixExtDir)\WixIIsExtension.dll&lt;/HintPath&gt;
        &lt;Name&gt;WixIIsExtension&lt;/Name&gt;
      &lt;/WixExtension&gt;
      &lt;WixExtension Include="WixUIExtension"&gt;
        &lt;HintPath&gt;$(WixExtDir)\WixUIExtension.dll&lt;/HintPath&gt;
        &lt;Name&gt;WixUIExtension&lt;/Name&gt;
      &lt;/WixExtension&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Content Include="EULA.rtf" /&gt;
      &lt;Content Include="IisManager.CA.dll" /&gt;
      &lt;Content Include="uac.manifest" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;BootstrapperFile Include="Microsoft.Windows.Installer.3.1" &gt;
        &lt;ProductName&gt;Windows Installer 3.1&lt;/ProductName&gt;
      &lt;/BootstrapperFile&gt;
    &lt;/ItemGroup&gt;
  
    &lt;Import Project="$(WixTargetsPath)" /&gt;
    &lt;Target Name="Bootstrapper"
          Inputs="$(OutDir)$(TargetFileName)"
          Outputs="$(OutDir)\Setup.exe"
          Condition=" '$(OutputType)'=='package' " &gt;
      &lt;GenerateBootstrapper ApplicationName="application name"
                            ApplicationFile="$(TargetFileName)"
                            BootstrapperItems="@(BootstrapperFile)"
                            ComponentsLocation="Relative"
                            OutputPath="$(OutputPath)"
                            Culture="en-US"
                            Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper" /&gt;
    &lt;/Target&gt;
    &lt;Target Name="PatchSetupExe" DependsOnTargets="Bootstrapper"&gt;
      &lt;Exec Command='"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin\mt.exe" -manifest "$(ProjectDir)uac.manifest" -updateresource:"$(ProjectDir)$(OutputPath)Setup.exe;#1"' IgnoreExitCode='false' /&gt;    
    &lt;/Target&gt;
    &lt;Import Project="$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets" /&gt;
  
    &lt;PropertyGroup&gt;
      &lt;BuildDependsOn&gt;$(BuildDependsOn);Bootstrapper;PatchSetupExe&lt;/BuildDependsOn&gt;
    &lt;/PropertyGroup&gt;
    &lt;Target Name="BeforeBuild"&gt;
      &lt;MSBuild Projects="%(ProjectReference.FullPath)" Targets="Package" Properties="Configuration=$(Configuration);Platform=AnyCPU" Condition="'%(ProjectReference.PackageThisProject)'=='True'" /&gt;
      &lt;Copy SourceFiles="%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\TransformWebConfig\transformed\web.config" OverwriteReadOnlyFiles="true" DestinationFolder="%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\PackageTmp\" Condition="'%(ProjectReference.PackageThisProject)'=='True'" /&gt;
      &lt;PropertyGroup&gt;
        &lt;LinkerBaseInputPaths&gt;%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\PackageTmp\&lt;/LinkerBaseInputPaths&gt;
        &lt;DefineConstants&gt;BasePath=%(ProjectReference.RootDir)%(ProjectReference.Directory);&lt;/DefineConstants&gt;
      &lt;/PropertyGroup&gt;
      &lt;HeatDirectory OutputFile="%(ProjectReference.Filename).wxs" Directory="%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\PackageTmp\" DirectoryRefId="INSTALLLOCATION" ComponentGroupName="%(ProjectReference.Filename)_Project" SuppressCom="true" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutoGenerateGuids="false" GenerateGuidsNow="true" ToolPath="$(WixToolPath)" Condition="'%(ProjectReference.PackageThisProject)'=='True'" PreprocessorVariable="var.BasePath" /&gt;
    &lt;/Target&gt;
    &lt;PropertyGroup&gt;
      &lt;PreBuildEvent /&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup&gt;
      &lt;PostBuildEvent /&gt;
    &lt;/PropertyGroup&gt;
    &lt;!--
      To modify your build process, add your task inside one of the targets below and uncomment it.
      Other similar extension points exist, see Wix.targets.
  
      &lt;Target Name="AfterBuild"&gt;
      &lt;/Target&gt;
      --&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>And here is my manifest file I'm trying to apply:</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="Setup" type="win32" /&gt;
    &lt;trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"&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>