> 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.D0119AF2_xxxx_xxxx_xxxx_xxxxxxxxxxxx,DestName=DLL2.dll,Attributes=16384,FileSize=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",publicKeyToken="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

Reply via email to