geekgrrl71

I'm trying to move a shell context dll into a VS2005 solution.

I have the dll as a project in my solution, with configurations for both x86 and x64. The dll was compiling and registering fine until I tried to add in the manifests for UAC on Vista.

My problem is that I have 1 project and two manifests - one for when I am build the x86 flavor and one when I am building the x64 flavor.

Setting the Linker - Manifest File - Generate Manifest file to No for All Configurations/All Platforms and including my manifest file in Manifest Tool - Input and Output - Additional Manifest Files as $(TargetFileName).manifest gives me the following error when I try to compile:

Error 26 manifest authoring error c1010001: Values of attribute "processorArchitecture" not equal in different manifest snippets. c:\Work1\PNFCC\4\PNBatchConverter\PNFCCSCM\PNFCCSCM.dll.manifest 1

The $(TargetFileName) is PNFCCSCM.dll and PNFCCSCM64.dll respectively, and the manifests are named accordingly.

I've also included the manifests I am using:

PNFCCSCM.dll.manifest

< xml version="1.0" encoding="UTF-8" standalone="yes" >
<assembly xmlns="urnTongue Tiedchemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="x86"
name="PNFCCSCM"
type="win32"/>
<description>PEERNET File Conversion Center 4.0</description>
<ms_asmv2:trustInfo xmlns:ms_asmv2="urnTongue Tiedchemas-microsoft-com:asm.v2">
<ms_asmv2Tongue Tiedecurity>
<ms_asmv2:requestedPrivileges>
<ms_asmv2:requestedExecutionLevel level="asInvoker">
</ms_asmv2:requestedExecutionLevel>
</ms_asmv2:requestedPrivileges>
</ms_asmv2Tongue Tiedecurity>
</ms_asmv2:trustInfo>
</assembly>

PNFCCSCM64.dll.manifest

< xml version="1.0" encoding="UTF-8" standalone="yes" >
<assembly xmlns="urnTongue Tiedchemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="amd64"
name="PNFCCSCM"
type="win32"/>
<description>PEERNET File Conversion Center 4.0</description>
<ms_asmv2:trustInfo xmlns:ms_asmv2="urnTongue Tiedchemas-microsoft-com:asm.v2">
<ms_asmv2Tongue Tiedecurity>
<ms_asmv2:requestedPrivileges>
<ms_asmv2:requestedExecutionLevel level="asInvoker">
</ms_asmv2:requestedExecutionLevel>
</ms_asmv2:requestedPrivileges>
</ms_asmv2Tongue Tiedecurity>
</ms_asmv2:trustInfo>
</assembly>




Re: Visual C++ General Error including manifest in unmanaged dll project for both 32/64 builds.

Bite Qiu - MSFT

Hello, may I know how did you generated these 2 manifests while generate menifest has been set to no did you use Mage.exe Why not just let the toolkit to generate and embed manifest for you






Re: Visual C++ General Error including manifest in unmanaged dll project for both 32/64 builds.

Bite Qiu - MSFT

Hello

We are changing the issue type to "Comment" because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to "Question" by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.


Thank you!






Re: Visual C++ General Error including manifest in unmanaged dll project for both 32/64 builds.

geekgrrl71

Sorry about the delay, I was busy with another issue.

The manifests were created manually using the instructions on pages 63 - 72 in "Windows Vista Application Development Requirements for User Account Control Compatibility".

I first left the manifest options to their default settings and created two new manifests, PNFCCSCM.dll.manifest for the Win32 dll PNFCCSCM.dll and PNFCCSCM64.dll.manifest for the x64 dll PNFCCSCM64.dll, and included the appropriate manifest as an Additional Manifests in the project settings for each build flavor (32 and 64).

That was when I started getting the error.

Then I turned off the Generate manifest option, left the manifest I created in the Additional manifest option but the same thing happened.

I also tried turning off the Generate Manifest options, not including any manifest and running mt.exe as a post-build command line option and again got the same error message.





Re: Visual C++ General Error including manifest in unmanaged dll project for both 32/64 builds.

Weidong Huang - MSFT

You can try to delete all the manifest files, dll files and executable files generated by VS. (Make clean) And then build the project again using your own manifest file as additional manifest input (just as you did).






Re: Visual C++ General Error including manifest in unmanaged dll project for both 32/64 builds.

geekgrrl71

Thanks, I'll give this a try.





Re: Visual C++ General Error including manifest in unmanaged dll project for both 32/64 builds.

geekgrrl71

I was able to resolve this issue.

I had to change my manifest files to the following

Code Snippet

< 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"
processorArchitecture="*"
name="PNFCCSCM"
type="win32"/>
<description>PEERNET File Conversion Center Shell Context Extension</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"/>
</dependentAssembly>
</dependency>
<ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
<ms_asmv2:security>
<ms_asmv2:requestedPrivileges>
<ms_asmv2:requestedExecutionLevel level="asInvoker">
</ms_asmv2:requestedExecutionLevel>
</ms_asmv2:requestedPrivileges>
</ms_asmv2:security>
</ms_asmv2:trustInfo>
</assembly>

The biggest change was change the value of processorArchitecture="x86" and processorArchitecture="AMD64 to processorArchitecture="*".

The other problem was that I was including both PNFCCSCM.dll.manifest and PNFCCSCM64.dll.manifest into the project solution. I removed them from the solution, let the manifest tool pick them up and all was well.