How do I relocate assemblies from a deployment project without breaking application references?

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2011-01-02T03:41:51Z Indexed on 2011/01/02 3:54 UTC
Read the original article Hit count: 268

Filed under:
|
|
|

Hi,

I have recently refactored a lot of my applications existing code and I am now looking at tidying up the deployment side of things.

The existing installer application installs everything in the application folder (with the exclusion of a couple of config files which are located in a sub folder). However, I have multiple applications which all use some common assemblies and my goal is to relocate a these particular assemblies to the "Common Files" folder in the program files directory.

NB: I have read a lot about the GAC but I have no experience with it and also read a few horror stories, so trying to get a simple solution for the time being.

I managed to get the assemblies installed into the Common Files folder, however, as a result (typical I.T.) I have broken my app! If I copy the assemblies back into the application folder it works fine so the problem is obviously to do with how my app is referencing the assemblies.

To get the installer to install the assemblies into the Common Files folder I just updated the Folder property of each assembly in the Detected Dependencies list. My thoughts were when I did that the installer would somehow update my application to tell it to look in that folder for them but that doens't appear to be the case.

What exactly am I doing wrong here?

© Stack Overflow or respective owner

Related posts about c#

Related posts about deployment