title: Mixing .Net Framework app with .Net Core library
body: <p>In a Visual Studio solution, I need to have a desktop winforms application project (.Net framework 4.0) depending on a .Net Core library project.
  I can't migrate the application to .Net core yet, but I need functionalities from .Net core (ie Microsoft.EntityFrameworkCore). That's why I created a new project as a dependency.</p>
  
  <p>It seems to cause a problem at build time:</p>
  
  <p><em>Reference to type 'Object' claims it is defined in 'System.Runtime', but it could not be found</em></p>
  
  <p>Idem with <em>DateTime</em>, <em>Enum</em>, <em>Decimal</em>, ...</p>
  
  <p>As if object wasn't the same in both project.
  I tried to use Microsoft.Windows.Compatibility but it doesn't seem to be a solution.</p>
  
  <p>Is there a way to have both projects build and run together?</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>I tried with a .Net standard project instead of .Net core, but in this case I can't even add a reference from .Net framework app to .Net standard library.</p>
  
  <p><em>Project "Std.csproj" targets "netstandard2.0", it can't be referenced by a project that targets ".NetFramework,Version=v4.0"</em></p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>I still get the same error with my dependency in .Net core 2.0 and my app in .Net Framework 4.6:</p>
  
  <p><em>Project "Std.csproj" targets "netstandard2.0", it can't be referenced by a project that targets ".NetFramework,Version=v4.6"</em></p>
  
  <p><strong>EDIT 3</strong></p>
  
  <p>I finally got rid of the error with .Net Framework 4.6.1. But, according to <a href="https://docs.microsoft.com/fr-fr/dotnet/framework/get-started/system-requirements" rel="noreferrer">required configuration</a> for this framework, it means I can't deploy to Windows XP anymore. To study...</p>
  
  <p>As my goal is to migrate gradually to .Net Core, any advice is welcome.</p>