I'm working on a class library project which provides client applications with a lot of useful extension methods. This project is expected to be used on a large variety of platforms (versions of the .NET framework).
In order to do that I'm going to use several separate Visual Studio projects, each one for its own platform.
These projects could have their own outer dependencies though the source code will be shared between them with the use of the "add as a reference" feature.
That approach will allow me to change the implementation for all projects by writing code in just one file without any need to copy it to other projects.
Keeping in mind differences in target frameworks, I will need to use #if
compiler directive(s).
The result of each project will be published as a NuGet package for a specific version of the .NET framework.
Here are two questions I have:
- Every new file has to be added to every project otherwise it won't be compiled and every class defined in it won't be accessible on certain platform. As you can realize it's very easy to forget that. Is there any way to avoid this kind of file tracking? Is it possible to automate it?
- How can I improve the whole infrastructure? What approaches and/or solutions do you use in your projects?