1

we have developed an utility project referenced by many other projects developed in sharepoint 2010. Now we are starting to use sharepoint 2013 and would like to still use the methods present in that utility. They should all be compatible with the new version, and I know I could create a copy of the current project change the referenced dll to make it work.

But that would make me replicate any change in one of the utilities in the other one. Is there a way to develop once and be able to run in both versions?

1

I can't take credit for this, as it is already answered on StackExchange.

Dual compiling in visual studio - SharePoint 2010/2013:

https://stackoverflow.com/questions/3488647/choose-dynamically-at-runtime-which-version-of-a-dll-to-use

| improve this answer | |
  • Well Actually it is SP 2007 and SP2010, not 2010/2013. I'll have to try – Maurizio Pozzobon Feb 10 '14 at 9:27
  • Ah you had best update your question. Although the technique won't be too dissimilar. – Hugh Wood Feb 10 '14 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.