title: Error in Net Framework App Using 4.6.1 with "System.Diagnostics.DiagnosticsSource" File Not Load
body: <p>Window Service (NetFramework) Application is Referencing NetStandard and NetFramework Projects, after It updated to netstardard 2.0 and set net framework 4.6.1 I have a problem with System.Diagnostics.DiagnosticsSource dll (4.0.2.1)</p>
  
  <p>Some steps I've followed:</p>
  
  <p><strong>1.-</strong> I've updated server host with the last runtime (2.0.4), and in my development environment with the sdk 2.1.3 (<a href="https://www.microsoft.com/net/download/windows" rel="nofollow noreferrer">https://www.microsoft.com/net/download/windows</a>).</p>
  
  <p><strong>NOTE:</strong> </p>
  
  <ul>
  <li><p>Development environment works (Debug), (Window 7 Visual Studio 2017)</p></li>
  <li><p>Production  environment doesn't works (Release), (Window Server 2012 R2)</p></li>
  </ul>
  
  <p><strong>2.-</strong> I've configured netstandard 2.0 with 4.6.1 net framework how say here (<a href="https://docs.microsoft.com/en-us/dotnet/standard/net-standard" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/standard/net-standard</a>), so All Net Framework Projects with 4.6.1 and all net starndard projects with 2.0.</p>
  
  <p><strong>3.-</strong> Setting my window service project file .cproj with: </p>
  
  <pre><code>&lt;PropertyGroup&gt;
     ...
     &lt;GenerateRuntimeConfigurationFiles&gt;true&lt;/GenerateRuntimeConfigurationFiles&gt;
     ...
  &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>And </p>
  
  <pre><code>&lt;PropertyGroup&gt;
     ...  
     &lt;AutoGenerateBindingRedirects&gt;true&lt;/AutoGenerateBindingRedirects&gt;  
  &lt;/PropertyGroup&gt;  
  </code></pre>
  
  <p>Doesn't work, REF: <a href="https://github.com/aspnet/EntityFrameworkCore/issues/7889" rel="nofollow noreferrer">https://github.com/aspnet/EntityFrameworkCore/issues/7889</a></p>
  
  <p><strong>4.-</strong> All the nuget package are consolidated and updated to last version.</p>
  
  <p>Some people fix the problem deleting global.json but the windows server projects doesn't use that file.</p>
  
  <p>Thansk all</p>