pondělí 14. března 2011

Change path of included DLL in Visual Studio 2010

Visual Studio 2010 remembers the previous locations of the DLL, and in some cases prefers the "standard" locations of the assemblies.
In one of our projects we have to add System.Windows.Interaction assembly which you can find in the .NET tab of the Add Reference dialog (well only if you had installed Expression studio before).
But we use Team Foundation Server as Source Control and Continous Integration solution and while this assembly was missing on the TFS server, the "after commit" build did not succeed.

So we took out the reference, copied the DLL to the Source Control and added the reference directly to this DLL. But somehow Visual Studio remembers the original location of the DLL and always points the PATH property of the reference to the original position.

The solution is to change the Project file and add manually the PATH to the DLL file

So instead of:

    
    
    
    
    
    
    
    
    
    


you can change the reference of the interactivity dll to:


   ..\Libraries\System.Windows.Interactivity.dll

1 komentář: