Avatar of andreas_rafn
Flag for Denmark asked on

Extending an existing project on basis of another project in the same solution in VS2010 and VB.NET

I have made a "base" application that implements the base functionality of the requirements for it. However next step is to create an "extended" version that supports external data through a thrid party application that need to be installed for the user in order to use it. Since not all users hold the prerequisites for the extended version, I would like to have a "base" and a "extended" version installed along with each other so that all users can use the system regardless of their setups through the "base", but use the features of the "extended" version if the have the third party application.

The extended version will be an exact copy of the base version with some code added. So I'm currently considering how I can do this the best way. Note that I have nearly no experience with deployment of big solutions with several projects.

Ideally the extended version merely references the base version and implements the extra functionalty on top. In that way changes made to the base version will be applied to the extended version too.

Is there a good way to do this?
Microsoft Development.NET ProgrammingVisual Basic.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon
Nasir Razzaq

You may want to look at Managed Extensibility Framework


I think you have 2 ways to do it:
1. The extended version has to inherits objects from base version and add extra functionalities.
In this solution the client needs to add reference to either base or extended version and use the specific objects and when it creates an object it should know if the object will be a base of extended object

2. Use the ExtensionAttrbute from System.Runtime.CompilerServices
This solution is only available for methods and functions and cannot be implemented for extending properties or events of an object. In this solution you'll create objects declared in the base library, but when you'll add the reference to the extended library you can use the methods and functions declared there for base objects

In order to give more detailed explaination I need to know which solutions do you think it best applies to your project
Jacques Bourgeois (James Burger)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Great answer! Thanks.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck