Re: Private assemblies without a manifest file?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Carl,

I did exactly that. The problem is when you embed the manifest into
your DLL it actually embeds the following:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></
requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT"
version="9.0.21022.8" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>

I think the <dependentAssembly> line is what's causing it to die if
the manifest file is missing. Can you comment on this?

Gili

On Sep 17, 11:26 am, "Carl Daniel [VC++ MVP]"
<cpdaniel_remove_this_and_nos...@xxxxxxxxxxxxxxx> wrote:
Gili wrote:
Hi,

I followed the steps outlined in
http://msdn.microsoft.com/en-us/library/ms235291.aspxsection
"Deploying Visual C++ library DLLs as private assemblies" but
instead of using an external manifest file (i.e.
Microsoft.VC90.CRT.manifest) I'd like to embed it in the DLLs somehow.

What should I be doing? I tried removing Microsoft.VC90.CRT.manifest
and LoadLibrary() failed. I tried embedding the manifest into
msvcr90.dll or the DLL loading it and that failed too. Please help.

You can embed the manifest in your DLL.  Make sure that you embed it with a
resource ID of 2 for a DLL, or 1 if you're building an EXE file.

See the links below for more information:

http://blogs.msdn.com/jonwis/archive/2006/01/17/514192.aspxhttp://blogs.msdn.com/zakramer/archive/2006/05/22/603558.aspx

The actual MSDN topic on the subject is at:

http://msdn.microsoft.com/en-us/library/ms235591.aspx

-cd

.



Relevant Pages

  • Manifests and VC8
    ... The linker generated a ... The manifest says that there is a dependency ... When I run a process that uses this DLL I get a FileNotFoundException. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Manifests and VC8
    ... The manifest says that there is a dependency ... > When I run a process that uses this DLL I get a FileNotFoundException. ... I just did a quick test, creating a C++ class library and a C# app that uses ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Manifest Hell - a thing of the past?
    ... just put the MFC and CRT DLLs in my program directory since the first MFC version of my program released in 1996. ... And I have never caused DLL Hell for anyone else by replacing someone's versions of MFC etc with the ones I am supplying. ... Putting the DLL's in your program directory is called App local installation. ... One reason MS pushed so hard for the manifest system is it let them issue patched DLL's that could override even the ones you had in your program directory. ...
    (microsoft.public.vc.mfc)
  • Re: Manifests and VC8
    ... assembly unless it has a corresponding manifest and follows naming rules. ... activate proper context for this Dll. ... The instruction on these MSDN pages apply to SxS assemblies. ... >> As for why linker does not embedd manifest, ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Manifest Hell - a thing of the past?
    ... Putting the DLL's in your program directory is called App local installation. ... Of course the original idea of DLLs was that you only needed one copy of a DLL on your hard drive and lots of programs could share it. ... One reason MS pushed so hard for the manifest system is it let them issue patched DLL's that could override even the ones you had in your program directory. ...
    (microsoft.public.vc.mfc)