views:

164

answers:

1

I have a class library project that references the version 4.1 Microsoft.Practices.Common dll. I also reference a 3rd party DLL that utilizes a different version of the Microsoft.Practices.Common DLL.

I create a windows app that references both of these DLL's.

I receive an error when running MSBUILD: "No way to resolve conflict between....". I assume this is because it is trying to build the projects and place all the files in the \bin directory and since the files are named the same it displays this message.

The project does build correctly but automatically ("arbitrarily") chooses the 4.1 (newer) version of the Common DLL.

The problem here is that I am unsure if the 3rd party's DLL is compatible with the 4.1 version.

My question: Is there a way using xcopy deployment to keep both DLLs? I would like to avoid the GAC if possible.

BTW, I love how neither visual studio nor MSBUILD flag this as a warning but just take a different version :)

A: 

You cannot xcopy deploy two copies of the same dll to a /bin folder. If you must use both, you will need to register items in the GAC, OR you could play with the privateprobing path to store them in a sub-folder of the /bin folder.

However ideally, in this case, to save yourself some hassle, I would recommend just using the same version that the third party does.

Mitchel Sellers
Would love to but they are referencing v1.0 so that's not an option :(Thanks for confirming what I feared.I was debating on recompiling the enterprise library DLLs with different names to circumvent this issue, but that's a hassle too.
Jay