Visual Studio 2010: How embed manifest with default settings

8.1k views Asked by At

In Visual Studio 2010, i want it to embed a manifest with default settings:

enter image description here

Unfortunately the embedded manifest does not include a dependency on version 6 of the common controls library:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

This means that my WinForms application "doesn't use XP themes":

enter image description here

How to a convince Visual Studio 2010 to include a manifest that includes a dependancy on version 6 of the common controls library?

2

There are 2 answers

0
Ian Boyd On BEST ANSWER

Cody had the answer to a question that has gone unresolved in Visual Studio for years, which helped me solve my problem.

Hans noted that you're not required to declare a dependancy on Common Controls Version 6 in order to get the version 6 library, which also helped me solve my problem.

So they should both get credit.

0
Sindhu S On

create your own manifest file. in notepad and save as app.manifest same code mentioned above with with level as administrator if you want code to run as admin level="requireAdministrator". then import it to your project , add new item -> select the file. later go to application properties and change the default manifest to the manifest file you created enter image description here