In Visual Studio you can set an option "Additional Manifest Files" in C++ projects in order to merge an additional manifest file into the default application manifest.
We use this option with a shared "compatibility manifest" that only includes a list of supported OS versions:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <!--app support for Windows Vista -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!--app support for Windows 7 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <!--app support for Windows 8 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!--app support for Windows 8.1 -->
</application>
</compatibility>
</assembly>
Now we would like to embed that shared manifest also into existing WinForms/WPF applications, so that it merges with the existing application manifest files. Is that possible with C# projects? We would like to avoid defining this list of OSes in every project.