Update for clarification:
I have a project which is exposed as Nuget package. I need it to be public to my solution assemblies but private to who ever will consume my package. Is there a way to accomplish that?
Original question:
A project I'm working on is currently using 2 entities projects and it's written over .Net Standard 2.0 framework:
Contract.csproj
Contract.Internal.csproj
The first is configured to be exposed for consumers using a private Nuget server, while the second is for internal use of my solution projects.
The thing is that both has pretty much the same classes except few that are for my solution internal use only.
Is there a way to merge them to a single project and configure some classes to be exposed in the NuGet package while others are not?
I read on the ExcludeAssets/IncludeAssets tags that can be added to the csproj PackageReference, but the docs and all the examples I saw are referring dependencies and their versions and not the project classes.
Also, if you have other solution, you work with your projects some other way on this one (Or even think that I find myself with that scenario is wrong) I'll be more than happy if you share you thoughts on this.