Share code between projects in a solution in Visual Studio 2008, when building a common assembly is

Posted by Binary255 on Stack Overflow See other posts from Stack Overflow or by Binary255
Published on 2010-05-03T17:24:31Z Indexed on 2010/05/03 17:28 UTC
Read the original article Hit count: 713

Filed under:

Hi,

I create an add-on for the product Foo. There are different versions of Foo, namely version 1, 2, 3 and 4.

These versions have a mostly compatible API, but not fully.

I currently have 5 projects:

  • DotNetCommon - here are the common methods which could be used if I create an add-on or something other than the Foo product.
  • FooOne
  • FooTwo
  • FooThree
  • FooFour

The Foo*-projects contains the add-in for version 1-4 of Foo.

There are a lot of duplicated files in the Foo*-projects, as there are a lot of things in the API which are identical for all versions of Foo. It would be nice to separate out everything which is common for all Foo-versions.

Why not just create a common assembly for all versions of Foo called FooCommon?

If I would put all classes which are common for all versions of Foo into a new library project, I would still have to choose which version of Foo the new FooCommon should reference. As said, they are not identical.

© Stack Overflow or respective owner

Related posts about visual-studio