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)
Some steps I've followed:
1.- I've updated server host with the last runtime (2.0.4), and in my development environment with the sdk 2.1.3 (https://www.microsoft.com/net/download/windows).
NOTE:
Development environment works (Debug), (Window 7 Visual Studio 2017)
Production environment doesn't works (Release), (Window Server 2012 R2)
2.- I've configured netstandard 2.0 with 4.6.1 net framework how say here (https://docs.microsoft.com/en-us/dotnet/standard/net-standard), so All Net Framework Projects with 4.6.1 and all net starndard projects with 2.0.
3.- Setting my window service project file .cproj with:
<PropertyGroup>
...
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
...
</PropertyGroup>
And
<PropertyGroup>
...
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
Doesn't work, REF: https://github.com/aspnet/EntityFrameworkCore/issues/7889
4.- All the nuget package are consolidated and updated to last version.
Some people fix the problem deleting global.json but the windows server projects doesn't use that file.
Thansk all