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:
true i can declare that i was designed and tested on Windows 7, and i should continue to depend on any bugs in Windows 7
i can declare that i am a good developer, and don't need file and registry virtualization
i can declare that i depend on a particular version 6 of the Microsoft Common Controls library:
i can declare that i depend on a particular version of GDI+:
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:

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:
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:
Doesn't work because it embeds no manifest
Under Resources select the Resource File radio option:

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:
Doesn't work because Visual Studio chokes when presented with an assembly manifest:
- Under Resources, select the Resource File radio option, then enter the path to a resource script file:
Doesn't work because Visual Studio chokes when presented with a resource script:
Add the
AssemblyManifest.xmlto my project, then look for it in the Manifest combo box:
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.rcbuild action to various things, build the.rcfile using a separate resource compiler, either manually, or a pre-build/msbuild step, and select that.resfile as my resource). i'll stop adding extra bulk to my question and hope for an answer.




