Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7051093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:13:22+00:00 2026-05-28T03:13:22+00:00

How can i add an assembly manifest to my .NET executable? An assembly manifest

  • 0

How can i add an assembly manifest to my .NET executable?


An assembly manifest is is an XML file that is added to a .NET portable executable (PE) with resource type RT_MANIFEST (24).

Assembly manifests are used to declare a number of things about the executable, e.g.:

  • If i want to disable DPI-scaling because i am a good developer:

    <!-- We are high-dpi aware on Windows Vista -->
    <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
       <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
          <dpiAware>true</dpiAware>
       </asmv3:windowsSettings>
    </asmv3:application>
    
  • i can declare that i was designed and tested on Windows 7, and i should continue to depend on any bugs in Windows 7

    <!-- We were designed and tested on Windows 7 -->
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
       <application>
          <!--The ID below indicates application support for Windows 7 -->
          <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
       </application>
    </compatibility>
    
  • i can declare that i am a good developer, and don’t need file and registry virtualization

    <!-- Disable file and registry virtualization -->
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
       <security>
          <requestedPrivileges>
             <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
          </requestedPrivileges>
       </security>
    </trustInfo>
    
  • i can declare that i depend on a particular version 6 of the Microsoft Common Controls library:

    <!-- Dependency on Common Controls version 6 -->
    <dependency>
       <dependentAssembly>
          <assemblyIdentity
                type="win32"
                name="Microsoft.Windows.Common-Controls"
                version="6.0.0.0"
                processorArchitecture="X86"
                publicKeyToken="6595b64144ccf1df"
                language="*"/>
       </dependentAssembly>
    </dependency>
    
  • i can declare that i depend on a particular version of GDI+:

    <dependency>
       <dependentAssembly>
          <assemblyIdentity type="win32" name="Microsoft.Windows.GdiPlus" version="1.0.0.0" processorArchitecture="x86"
                publicKeyToken="6595b64144ccf1df" language="*" />
       </dependentAssembly>
    </dependency>
    

In the olden days, we would create a resource script file (*.rc), e.g.:

wumpa.rc

   1    24    AssemblyManifest.xml

add that file to the project, and the compiler would compile the .rc file; including resources in the final executable image.

Except Visual Studio 2010 doesn’t seem to have a way to add a resource script file to a project.

How do i add a resource script to a project in Visual Studio 2010?

How do i add an assembly manifest to a project in Visual Studio 2010?

Note: Any solution must work in an environment with source control and multiple developers (e.g. hard-coded paths to probably not installed binaries will break the build and not work).

Bonus Chatter

  • VS2010/.NET: How to embed a resource in a .NET PE executable?
  • VS2005: How to embed a manifest in an assembly: let me count the ways… (can’t be done)

Update: Michael Fox suggests that the project properties dialog can be used to include an assembly manifest, but he doesn’t indicate where:

enter image description here


Update: Things I’ve tried:

  • From the project properties screen, select Application. Select radio option Icon and Manifest. Under Manifest leave the default option of Embed manifest with default settings:

enter image description here

Doesn’t work because it embeds a manifest with default settings, rather than my settings.

  • Under Manifest, change the combo option to Create application without a manifest:

    enter image description here

    Doesn’t work because it embeds no manifest

  • Under Resources select the Resource File radio option:

    enter image description here

    Doesn’t work because you cannot select an assembly manifest (or a resource script that includes an assembly manifest)

  • Under Resources, select the Resource File radio option, then enter the path to an assembly manifest XML file:

enter image description here

Doesn’t work because Visual Studio chokes when presented with an assembly manifest:

enter image description here

  • Under Resources, select the Resource File radio option, then enter the path to a resource script file:

enter image description here

Doesn’t work because Visual Studio chokes when presented with a resource script:

enter image description here

  • Add the AssemblyManifest.xml to my project, then look for it in the Manifest combo box:

    enter image description here

    Doesn’t work because the Assembly Manifest file isn’t listed as an option

i have a dozen other things i can keep screenshotting (add a .rc file to the solution, look for it in the dropdown, select “no manifest” and change the wumpa.rc build action to various things, build the .rc file using a separate resource compiler, either manually, or a pre-build/msbuild step, and select that .res file as my resource). i’ll stop adding extra bulk to my question and hope for an answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:13:22+00:00Added an answer on May 28, 2026 at 3:13 am

    If you want to add custom information to your application’s manifest, you can follow these steps:

    1. Right-click on the project in the Solution Explorer.
    2. Click “Add New Item”.
    3. Select “Application Manifest File”.

    This adds a file named app.manifest to your project, which you can open and modify as desired.


    Similar steps, with screenshots, lifted from Declaring Managed Applications As DPI-Aware on MSDN:

    1. In the Solution Explorer, right-click on your project, point to Add, and then click New Item.

    2. In the Add New Item dialog box, select Application Manifest File, and then click Add. The app.manifest file appears.

      enter image description here

    3. Copy and paste the following text into the app.manifest file and then save.

      <?xml version="1.0" encoding="utf-8"?>
      <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" 
                      xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" 
                      xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" 
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      
        <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
      
          <!-- Disable file and registry virtualization. -->
          <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
            <security>
              <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
               <requestedExecutionLevel level="asInvoker" uiAccess="false" />
               <!--  <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
                     <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
                     <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
               -->
              </requestedPrivileges>
            </security>
          </trustInfo>
      
          <!-- We are high-dpi aware on Windows Vista -->
          <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
            <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
              <dpiAware>true</dpiAware>
            </asmv3:windowsSettings>
          </asmv3:application>
      
          <!-- Declare that we were designed to work with Windows Vista and Windows 7-->
          <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
            <application>
              <!--The ID below indicates application support for Windows Vista -->
              <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
              <!--The ID below indicates application support for Windows 7 -->
              <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
            </application>
          </compatibility>
      
          <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
          <dependency>
            <dependentAssembly>
              <assemblyIdentity
                  type="win32"
                  name="Microsoft.Windows.Common-Controls"
                  version="6.0.0.0"
                  processorArchitecture="*"
                  publicKeyToken="6595b64144ccf1df"
                  language="*"
              />
            </dependentAssembly>
          </dependency>
      
        </asmv1:assembly>
      
    4. In the Solution Explorer, right-click on the project, and then click Properties to verify that the app.manifest is used.

      enter image description here

    5. Your application is now manifested as required to be “designed for Windows”, and is

      • disables file and registry virtualization
      • disables DWM scaling of applications
      • announces that you were designed and tested on Windows 7 and Windows Vista
      • takes a dependency on Common Controls library version 6 (enabling the use of visual styles by the common controls)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a factory assembly that can process any type of transaction (that supports
I remember reading briefly that you can add assembly attributes so that you can
I know I can add a icon to the Resources.resx file of a project
I know that I can add a HintPath to an external DLLs to help
Users on my site can add nodes of a custom type (let's call it
Q1 We can add assembly reference to a web project via Website --> Add
How can I programmatically add an assembly (DLL) as reference in a C# project?
HY, Know someone how can i add a assembly to GAC and Add reference
Ruby can add methods to the Number class and other core types to get
I can add and remove the last line in my dynamic form and calculate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.