Question

Locked

how to embed manifest along with exe available in setup project?

By sakaleswararao ·
My manifest file contains below information:

<?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"/>
<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>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="csrpc" version="1.0.0.0" language="*" processorArchitecture="x86" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="csmediaplayer" version="1.0.0.0" language="*" processorArchitecture="x86" />
</dependentAssembly>
</dependency>
</asmv1:assembly>
(1st manifest file)

I have a below post build event to embed the manifest along with application exe in my project:

"C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin\mt.exe" -manifest "$(TargetDir)$(TargetFileName).manifest" -outputresource:"$(TargetPath)"

I do have a setup project to create the installer. I built the installer and installed in Win 7 machine and ran the application which throws error.
I?ve copied my application.exe file to my desktop then opened in visual studio and exported the manifest info. This manifest info looks like below:

<?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"/>
<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>
</asmv1:assembly>
(2nd manifest file)

By comparing these, I found that the dependency tag is missing in installers exe manifest.

Now I?ve checked with my project there were no build errors. Also it shows the post build event executed successfully. To confirm with, I?ve opened the exe (available in project?s debug folder) in visual studio then exported the manifest. This shows exactly my 1st manifest file only. If I copy this exe to windows 7 machine then my application started functioning correctly.

My question is: how do I embed the manifest along with my exe available in setup project also?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Windows Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums