Denis
Denis

Reputation: 12077

How to manage different releases of supporting DLLs in Visual Studio 2010?

I have a VB.NET/C# Visual Studio 2010 Solution with a bunch of projects that depend on about 30 third-party DLLs all from 1 vendor. This third-party vendor recently released a new version of their software so I would like to parallel test their new software and my enhancements until I am comfortable to switch over. What is the best way to setup a solution in Visual Studio 2010 so that I can use the code I have developed on top of these third-party DLLs and have the opportunity to easily switch between:

(1) the new version of the third-party DLLs [for my testing] and
(2) the old version of the third-party DLLs in case I need to debug some problem a user is having

Third party assemblies ARE NOT in GAC (they're currently in a folder on a network drive). They are NOT strongly signed (ran sn -vf ). They are changing from version 5.4.618.0 to 5.4.619.60.

Upvotes: 1

Views: 304

Answers (3)

Adam Tuliper
Adam Tuliper

Reputation: 30152

If there is simply a minor version change and these haven't been signed, then you can just swap out the libraries. Otherwise you will need to add bindings redirectsin your app.config to point a prior reference to the new version or just create a second project file with the updated references in it for your second folder.

Upvotes: 0

competent_tech
competent_tech

Reputation: 44931

The way we handle this is to create an Assemblies folder associated with the project/solution at the file system level.

Whenever we have third-party DLLs that we need to use, they go into this folder and the reference in the projects are made to the files in the folder, not to the versions in GAC.

This allows us to update dev machines with new releases and test them. Since all of our code, including the assemblies, are stored in subversion, if we need to test a version that the customer is having problems with, we check that release out of subversion into a different directory and we have an exact replica of what the customer is using.

We've been doing this for about 8 years on some very large projects and it has worked very, very well for us.

Upvotes: 1

Pawan Mishra
Pawan Mishra

Reputation: 7268

You can use binding redirect and codebase combination to logically group the assemblies. It also helps in the case where you need to support multiple versions of same assembly. If the assembly is not strongly named or is not found in the GAC, the runtime looks for applicable codeBase elements in your machine and application configuration files. The codeBase element maps an assembly name to a file or a uniform resource locator (URL). If the assembly is strongly named, codeBase can refer to any location, including Internet-based URLs; otherwise, codeBase must refer to a directory relative to the application directory.

In case of Windows Workflow it is very common to have multiple versions of workflow, executing side by side. In that case the assemblies are strongly named and then appropriate entries are added in codebase section of web.config file. You can check out any standard documentation on WF and see as how it is implemented.

Upvotes: 0

Related Questions