locked
How to Reference assembly in GAC using relative path? RRS feed

  • Question

  • Hope I am posting this to the right forum.

    I have some third party dlls that are already installed into GAC. I have a local copy of these dlls and am trying to create project reference to these local dlls in VS 2010 C#. However, no matter I locate the local copy of the assemblies they are added to the project file as a reference to GAC - see below.

    <Reference Include="Telerik.WinControls.GridView, Version=2010.2.10.806, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" />

    Is there any way to bypass this. Reason is if I can't fix this then it will fail in my build machine that doesn't have these assemblies installed in the GAC.

    Tuesday, September 14, 2010 4:34 PM

Answers

  • should update the references in project file as below:

    Instead of:

    <Reference Include="Telerik.WinControls.UI, Version=2010.2.10.806, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL"/>

     

    Do this: <Reference Include="Telerik.WinControls.UI, Version=2010.2.10.806, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL">
          <HintPath>..\..\Assemblies\Telerik\2010\Telerik.WinControls.UI.dll</HintPath>

    </Reference>

    • Marked as answer by Lord Of Agony Wednesday, September 15, 2010 3:18 PM
    Wednesday, September 15, 2010 3:18 PM