I have a .NET class library project that targets UWP applications. I wish to re-purpose it to also support Xamarin.Forms applications.
Initially, I imagined that I could achieve this by creating a new .csproj
file, in the same directory as the original, and configure it to reference the same set of source files, but with a different set of dependencies, as appropriate to the target framework.
However, this doesn't seem possible, since each of the projects expects its dependencies to be defined in a project.json
file that resides in the project directory. If it were permissible to rename project.json
to a framework-specific name, that would solve the problem. But, as far as I can see, the name and the location of project.json
is fixed.
Is there a recommended way of creating multiple projects that reference the same codebase, but with different dependencies?