One of the projects I'm working on at the moment is utilising Endeca. The latest version of Endeca, v6, is built on the 64bit platform. The production environment that we are running is 64bit, however our local and development environments are using v5.1.4, which is 32bit. This becomes an issue in that when we are developing locally, or testing, we cannot return results from the Endeca engine if the solution has been built in v6. 

Previously, I was deleting/re-adding the references in each project for either v5 or v6 and then building the solution. As it happens, Visual Studio project files have a great feature of Condition statements. What I've ended up doing is the following:

- Create a new folder in your solution folder, that contains both versions of the dll's. 
- In Visual Studio, create/extend the platforms you wish to use, e.g. Debug, QA, Release, Production etc.
- Open up the web application project file (.csproj). 

<Reference Include="Endeca.Logging" Condition="'$(Configuration)'=='Debug'">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\References\dlls\Debug\Endeca.Logging.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="Endeca.Logging" Condition="'$(Configuration)'=='QA'">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\References\dlls\QA\Endeca.Logging.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="Endeca.Navigation" Condition="'$(Configuration)'=='Debug'">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\References\dlls\Debug\Endeca.Navigation.dll</HintPath>
    </Reference>
    <Reference Include="Endeca.Navigation" Condition="'$(Configuration)'=='QA'">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\References\dlls\QA\Endeca.Navigation.dll</HintPath>
    </Reference>
    <Reference Include="Endeca.Navigation.AccessControl" Condition="'$(Configuration)'=='Debug'">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\References\dlls\Debug\Endeca.Navigation.AccessControl.dll</HintPath>
    </Reference>
    <Reference Include="Endeca.Navigation.AccessControl" Condition="'$(Configuration)'=='QA'">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\References\dlls\QA\Endeca.Navigation.AccessControl.dll</HintPath>
    </Reference>
    <Reference Include="Endeca.Logging" Condition="'$(Configuration)'=='Release'">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\References\dlls\Release\Endeca.Logging.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="Endeca.Navigation" Condition="'$(Configuration)'=='Release'">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\References\dlls\Release\Endeca.Navigation.dll</HintPath>
    </Reference>
    <Reference Include="Endeca.Navigation.AccessControl" Condition="'$(Configuration)'=='Release'">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\References\dlls\Release\Endeca.Navigation.AccessControl.dll</HintPath>
    </Reference>

By using the Condition statement, I can tell the IDE that depending on which version of the site I am developing/releasing in, the references will reflect accordingly, meaning any new API functionality in V6 will build.

All that's left now is to create a simple pre-build task that copies the relevant dll into the bin folder. I have used XCOPY that uses the $(Configuration) variable as the directory that contains the dll, as both versions of the dll are the same name.

XCOPY $(SOLUTIONDIR)References\dlls\$(Configuration)\Endeca.Logging.dll $(ProjectDir)bin /Y
XCOPY $(SOLUTIONDIR)References\dlls\$(Configuration)\Endeca.Navigation.dll $(ProjectDir)bin /Y
XCOPY $(SOLUTIONDIR)References\dlls\$(Configuration)\Endeca.Navigation.AccessControl.dll $(ProjectDir)bin /Y

Comments

Johnathon Derick United States

Wednesday, February 17, 2010 8:44 PM

Johnathon Derick

This is a outstanding post, but I was wondering how do I suscribe to the RSS feed?

Mario Rousse United States

Friday, February 19, 2010 3:48 AM

Mario Rousse

Exceptional site, where did you come up with the info in this summary? I'm glad I found it though, ill be checking back soon to see what other articles you have.

Rema Spene United States

Friday, February 19, 2010 4:21 PM

Rema Spene

This is a good post, but I was wondering how do I suscribe to the RSS feed?

Tammera Kwok United States

Saturday, February 20, 2010 4:58 PM

Tammera Kwok

This is a good piece of content, I discovered your web page browsing bing for a related content and arrived to this. I couldnt get to much alternative information and facts on this blog, so it was good to discover this one. I likely will end up being returning to check out some other articles that you have another time.

Calvin Guevarra United States

Sunday, February 21, 2010 6:49 PM

Calvin Guevarra

This is a very intriguing post, I was looking for this knowledge. Just so you know I discovered your weblog when I was researching for blogs like mine, so please check out my site sometime and leave me a comment to let me know what you think.

Donovan Terhorst United States

Monday, February 22, 2010 4:08 AM

Donovan Terhorst

I don't agree with everything in this blog post, but you do make some very good points. I'm very interested in this subject and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.

Bernardina Kaas United States

Monday, February 22, 2010 5:18 PM

Bernardina Kaas

This is a really good post, but I was wondering how do I suscribe to the RSS feed?

Nadia Clay United States

Thursday, February 25, 2010 6:55 AM

Nadia Clay

This is a amazing post, but I was wondering how do I suscribe to the RSS feed?

Ike Breuninger United States

Thursday, February 25, 2010 5:39 PM

Ike Breuninger

I don't agree with everything in this posting, but you do make some very good points. Im very interested in this subject and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.

acai berry United States

Thursday, February 25, 2010 10:10 PM

acai berry

Interesting idea for a blog. I was just surfing the Internet for fun and came upon your website. Great post. Thanks a ton for sharing your experience! It is nice to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon.

Louie Dushaj United States

Friday, February 26, 2010 3:18 AM

Louie Dushaj

This is a very good post, but I was wondering how do I suscribe to the RSS feed?

Dia Stiern United States

Friday, February 26, 2010 1:39 PM

Dia Stiern

I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites weblog list and will be checking back soon. Please check out my site as well and let me know what you think.

miniature voltage United States

Monday, March 01, 2010 8:14 AM

miniature voltage

i dont know what u say, but i like to visit your blog...thanks

Viagra tablets UK United Kingdom

Tuesday, March 02, 2010 1:36 AM

Viagra tablets UK

Some scientific studies suggest that a loving relationship, physical touch and sex can bring health benefits such as lower blood pressure.

Calvin Guevarra United States

Tuesday, March 02, 2010 10:36 AM

Calvin Guevarra

This is a wonderful post, but I was wondering how do I suscribe to the RSS feed?

Purchase Viagra United Kingdom

Tuesday, March 02, 2010 2:18 PM

Purchase Viagra

Instead of being shackled by the prohibitive prospects of patronising the local pharmacies, there are cheaper options to buying Viagra pills.

hd movies United States

Thursday, March 04, 2010 6:57 PM

hd movies

I enjoy streaming movies online, it is way cheaper than going to the theaters.

Sima Urso United States

Friday, March 05, 2010 3:03 AM

Sima Urso

Well done! - I looked at the Wiki on this and it did not have as detailed info - thanks!

buy cialis overnight United States

Saturday, March 06, 2010 8:01 PM

buy cialis overnight

I appreciate the insight, and I think the writer definately knows their stuff... has better details than the wiki on the subject!

Maudie Boards United States

Sunday, March 07, 2010 7:04 AM

Maudie Boards

Wow, truly outstanding information. Your blog is really cool. I bookmarked this and will return again.

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading