How to use same source code for different framework or platform

Sanjay Kumar Jha 151 Reputation points


I have three different platforms on which I want to use class files defined in these folders.

I don't want to use them "As a link".Because in this case folder structure will not be physically available in these projects.

My requirement is to use files available in these folders without physically creating folders in my project but folders structure should be visible in my projects.

My requirement is just to use the same source code in all projects without replication of source files. How will it be possible?

Please find the source code.





Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,598 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,261 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,633 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 114.6K Reputation points

    Try creating a new Shared Project using the New Project dialog. Add some classes, then check if you can use the “Add Shared Project Reference” command in your main projects. The shared project must be also added to your solutions.

    1 person found this answer helpful.