Have you tried putting them in separate components or just using the
CopyFile element?



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Geoff
Finger
Sent: Thursday, December 06, 2007 6:16 PM
Cc: wix-users@lists.sourceforge.net;
[EMAIL PROTECTED]
Subject: Re: [WiX-users] Multi-file assembly problem

Yes, I'm creating the manifests myself. Or rather I'm taking the
automatically generated manifests, modifying them if necessary, and
signing them "by hand" using mt.exe, makecat and signtool.

I started out with manifest dependencies in DLL1 for DLL2 and DLL3,
but that doesn't help with a LoadLibrary call, which expects to load
the files directly. (I could remove the LoadLibrary call, but the
results of that are passed on to a couple different functions, which
pass results on to a couple different functions, and in the end
ripping it out would directly or indirectly effect a lot of the code.)

Putting the multiple file references into a single manifest file was
what I was trying at the end of the original email. If I embedded the
manifest back into the DLL1 file then Wix threw an error on
installation. If I just left the original unmodified manifest in the
DLL1 file then all the files get installed to the correct place, but
then the program can't locate DLL1 anymore. It seems like I may need
to do something differently with the manifest embedding for multifile
assemblies, but I'm not sure what.

The _simple_ solution would be finding a way to just force Wix to copy
the files over without futzing about with the manifests any more than
I already have.

On Dec 6, 2007 4:58 PM, Kelly Leahy <[EMAIL PROTECTED]> wrote:
>
> Are you creating the manifest yourself?
>
> You should be able to create a manifest that has dependency references
in it
> for DLL2 and DLL3...
>
> See the <dependency> and <dependentAssembly> tags in Manifest
reference:
> http://msdn2.microsoft.com/en-us/library/aa374219.aspx
>
> It also looks like you can put multiple files in a single 'assembly
> manifest', but I don't know how to get WiX to install them.
>
> I still don't understand why your LoadLibrary works when you have the
files
> in the same folder though - I'd be curious to see what
GetModuleFileName
> returns on those modules.
>
> Kelly
>
>
>
>
>
> "Geoff Finger" <[EMAIL PROTECTED]>
>
> Sent by: [EMAIL PROTECTED]
>
> 12/06/2007 04:29 PM
>
> To wix-users@lists.sourceforge.net,
[EMAIL PROTECTED]
>
> cc
>
> Subject Re: [WiX-users] Multi-file assembly problem
>
>
>
>
>
>
> The problem is that if I installed everything via the old method (each
>  of the three files set up as its own assembly with its own WinSxS
>  folder) and then copied the DLL2 and DLL3 files from their WinSxS
>  folders into the WinSxS folder for DLL1 then everything ran
correctly.
>
>  If i can just recreate that situation with the installer then
>  everything would be fine, but Wix/Msi seems to refuse to copy
>  additional files into DLL1's WinSxS folder unless they're included in
>  the assembly manifest. Despite the fact they're part of DLL1's
>  Component block in Wix.
>
>  On Dec 6, 2007 4:10 PM, Kelly Leahy <[EMAIL PROTECTED]> wrote:
>  >
>  > > Or it _does_ cause them to get copied over to the DLL1
side-by-side
>  >  > folder, but then my program can't find DLL1 anymore for reasons
I
>  >  > can't figure out.
>  >
>  > Uhh...  I think I can explain this one.  Consider the following
case:
>  >
>  > DLL1 in folder <not in path>
>  > DLL2 in folder <not in path>
>  >
>  > DLL1 loads DLL2 using LoadLibrary (and relative path).
>  >
>  > Application loads DLL1 by absolute path (like the way SxS works).
>  >
>  > DLL1 won't successfully load DLL2.  Also, if DLL1 'statically'
binds to
>  > DLL2, it will fail to load DLL1 altogether, since DLL2 isn't on the
path.
>  >
>  > The key thing here is that the only 'application folder' that is
used to
>  > resolve DLL dependencies is the EXE path, not the DLL path.
>  >
>  > http://msdn2.microsoft.com/en-us/library/ms682586.aspx
>  >
>  > Under no circumstances is the location of the DLL that is loading
the
> other
>  > DLL used in determining the DLL search path.  This is why people
have so
>  > many problems with COM in-process servers that try to load DLL
> dependencies
>  > from their "application" directory.
>  >
>  >
>  >
>  >
>  >  "Geoff Finger" <[EMAIL PROTECTED]>
>  >
>  > Sent by: [EMAIL PROTECTED]
>  >
>  > 12/06/2007 03:38 PM
>  >
>  > To wix-users@lists.sourceforge.net
>  >
>  > cc
>  >
>  > Subject [WiX-users] Multi-file assembly problem
>  >
>  >
>  >
>  >
>  >
>  >
>  > Short version:
>  >  Is there any way to override what seems to be the default behavior
and
>  >  force Wix/msi to install additional file elements in an assembly
>  >  Component into the WinSxS folder even though they aren't included
in
>  >  the main file's manifest? Or alternately are there any kind and
>  >  generous souls out there who know how to correctly combine several
>  >  dlls into one multifile assembly using mt.exe , makecat and
signtool?
>  >
>  >  Long version:
>  >  I've got a couple legacy dlls that I'm trying to include as
>  >  Side-by-side assemblies. I've gone through this process with other
>  >  files just fine before. The problem in this case is that one of
the
>  >  dlls tries to load the others directly via LoadLibrary, and after
>  >  digging through the code a little it seems that changing that
behavior
>  >  would cascade into rewriting the whole library. Making them into a
>  >  multifile assembly seems like it would work, but all the
instructions
>  >  for making those are for C# code compiled with .NET, no
explanation
>  >  about how to handle legacy code.
>  >
>  >  This would seem like an occasion to just give up on the whole
assembly
>  >  idea, but I happened to discover while testing an installation
that if
>  >  i just copy DLLs 2 and 3 to the Side-by-side folder for DLL 1 then
the
>  >  whole thing works. So if I can just get Wix to put the files there
>  >  everything will be great.
>  >
>  >  However I've run into issues trying to get the files to install in
>  >  that manner. If i add the files to the dll 1 Component then the
log
>  >  file says things like:
>  >
>  >  MSI (s) (5C:A8) [13:44:49:394]: Executing op:
>  >
>  >
>
AssemblyCopy(SourceName=DLL2.dll|DLL2I.dll,SourceCabKey=DLL2FileLocal.D0
119AF2_xxxx_xxxx_xxxx_xxxxxxxxxxxx,DestName=DLL2.dll,Attributes=16384,Fi
leSize=57344,PerTick=32768,,VerifyMedia=1,,,,,ComponentId={7049DC30-651B
-427D-A90B-3FAF27B23C27},,,,AssemblyMode=0,)
>  >  MSI (s) (5C:A8) [13:44:49:394]: Source for file
>  >  'DLL2FileLocal.D0119AF2_xxxx_xxxx_xxxx_xxxxxxxxxxxx' is compressed
>  >  InstallFiles: File: DLL2.dll, Directory: , Size: 57344
>  >
>  >  However nothing actually gets copied the DLL1 side-by-side folder
>  >  except for DLL1 itself.
>  >
>  >  I then tried changing the DLL1 manifest to include DLLs 2 and 3.
That
>  >  either causes an installation error:
>  >  Error 1935. An error occured during the installation of assembly
>  >  component {7049DC30-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. HRESULT:
0x800736CC.
>  >  assembly interface: IAssemblyCacheItem, function: Commit, assembly
>  >  name:
>  >
>
DLL1,version="1.0.0.0",type="win32",processorArchitecture="X86",publicKe
yToken="0301xxxxxxxxxxxx"
>  >
>  >  Or it _does_ cause them to get copied over to the DLL1
side-by-side
>  >  folder, but then my program can't find DLL1 anymore for reasons I
>  >  can't figure out. (Depends says the Side-by-Side configuration has
an
>  >  error, but when I right click on DLL1.dll in the depends file
window
>  >  and select Properties it can find the file in WinSxS just fine.)
>  >  (The difference between the two problems is at what point I embed
the
>  >  modified manifest file into the original DLL1 file using mt.exe)
>  >
>  >  I will be much obliged to anyone who can clear any of this mess
up.
>  >
>  >
>
------------------------------------------------------------------------
-
>  >  SF.Net email is sponsored by:
>  >  Check out the new SourceForge.net Marketplace.
>  >  It's the best place to buy or sell services for
>  >  just about anything Open Source.
>  >  http://sourceforge.net/services/buy/index.php
>  >  _______________________________________________
>  >  WiX-users mailing list
>  >  WiX-users@lists.sourceforge.net
>  >  https://lists.sourceforge.net/lists/listinfo/wix-users
>  >
>  >
>  >
>  >
>  >
>
************************************************************************
**************
>  >  This communication is intended solely for the addressee and is
>  >  confidential. If you are not the intended recipient, any
disclosure,
>  >  copying, distribution or any action taken or omitted to be taken
in
>  >  reliance on it, is prohibited and may be unlawful.  Unless
indicated
>  >  to the contrary: it does not constitute professional advice or
>  >  opinions upon which reliance may be made by the addressee or any
>  >  other party, and it should be considered to be a work in progress.
>  >  Unless stated otherwise, this communication does not form a
prescribed
>  >  statement of actuarial opinion under American Academy of Actuaries
>  >  guidelines.
>  >
>  >
>
************************************************************************
**************
>
>
------------------------------------------------------------------------
-
>  SF.Net email is sponsored by:
>  Check out the new SourceForge.net Marketplace.
>  It's the best place to buy or sell services for
>  just about anything Open Source.
>  http://sourceforge.net/services/buy/index.php
>  _______________________________________________
>  WiX-users mailing list
>  WiX-users@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
>
>
************************************************************************
**************
>  This communication is intended solely for the addressee and is
>  confidential. If you are not the intended recipient, any disclosure,
>  copying, distribution or any action taken or omitted to be taken in
>  reliance on it, is prohibited and may be unlawful.  Unless indicated
>  to the contrary: it does not constitute professional advice or
>  opinions upon which reliance may be made by the addressee or any
>  other party, and it should be considered to be a work in progress.
>  Unless stated otherwise, this communication does not form a
prescribed
>  statement of actuarial opinion under American Academy of Actuaries
>  guidelines.
>
>
************************************************************************
**************

------------------------------------------------------------------------
-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to