Use .net core with legacy .net framework dlls : <p>Can I use .net core with legacy .net framework dlls? The answer seems to be no... but I can only find resources referring to <strong>project.json, which doesn't exist anymore.</strong></p>

<p>I created a new .net core library and tried to reference a legacy .net framework DLL. When I tried to call into the DLL, vs2017 complained that I didn't have the Stream object is was looking for.</p>

<p>It suggested I reference either mscorlib.dll or installa Nuget package. </p>

<p>The quick help failed to reference mscorlib.dll. If I manually referenced it, I get the following error:</p>

<blockquote>
  <p>The type 'TargetFrameworkAttribute' exists in both 'mscorlib,
  Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and
  'System.Runtime, Version=4.1.0.0, Culture=neutral,
  PublicKeyToken=b03f5f7f11d50a3a'  C:\Users...\AppData\Local\Temp.NETCoreApp,Version=v1.1.AssemblyAttributes.cs</p>
</blockquote>

<p>The NuGet package is Microsoft.NETFx2.0. The quick help fails to install it. If I run it from the command line:</p>

<pre><code>&gt; PM&gt; install-package microsoft.netfx20   GET
&gt; https://api.nuget.org/v3/registration2-gz/microsoft.netfx20/index.json
&gt; OK
&gt; https://api.nuget.org/v3/registration2-gz/microsoft.netfx20/index.json
&gt; 46ms Restoring packages for ... Install-Package : Package
&gt; Microsoft.NetFX20 1.0.3 is not compatible with netcoreapp1.1
&gt; (.NETCoreApp,Version=v1.1). Package Microsoft.NetFX20 1.0.3 supports:
&gt; net20 (.NETFramework,Version=v2.0)At line:1 char:1
&gt; + install-package microsoft.netfx20
&gt; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt;     + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
&gt;     + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
&gt; Install-Package : One or more packages are incompatible with
&gt; .NETCoreApp,Version=v1.1.At line:1 char:1
&gt; + install-package microsoft.netfx20
&gt; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt;     + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
&gt;     + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
&gt; Install-Package : Package restore failed. Rolling back package changes
&gt; for .At line:1 char:1
&gt; + install-package microsoft.netfx20
&gt; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt;     + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
&gt;     + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
&gt; Time Elapsed: 00:00:00.8035644
</code></pre>
