VS2015 wanting to shared code with .NET Core and other platform


I have a project with a library I like to port to .NET Core
I am working with VS Community 2015

I got only 1 source for Android, iOS, and desktop .NET with some #ifdef inside problematic / private code block and I share the source across individual project for each target platform with a shared project.

I would like to do the same thing for .NET core…
.NET Core project don’t seem to accept linked file or shared project.

Should I really duplicate the code or is the some trick?
I am wondering about putting the project.json and .xproj in the shared code folder too…

Any tip?


Well… I put the .xproj and project.json in shared code folder and… it seems to work…

But I have strange error, like the compiler says: DBNull and IServiceProvider not found

But they are here according to the API!!


Never mind, found it!

All good!
Porting in progress… :slight_smile:

.NET Foundation Website | Blog | Projects | Code of Conduct