开发者

Project references each refer to different assembly versions

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 th开发者_开发知识库e GAC if possible.

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜