serilog-sinks-mssqlserver: Using MSSQLServer sink with dnx451: Could not load file or assembly Serilog.FullNetFx

I’m trying to get the MSSQLServer sink up and running in the asp.net 5 web application but this is the exeception I’m getting during the logger creation:

An exception of type ‘System.IO.FileNotFoundException’ occurred in mscorlib.dll but was not handled in user code Additional information: Could not load file or assembly ‘Serilog.FullNetFx, Version=1.5.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10’ With the code:

Log.Logger = new LoggerConfiguration() .ReadFrom.Configuration(configuration) .CreateLogger();

Please not I’m also using the Serilog.Settings.Configuration Here are parts of my project.json "Serilog.Extensions.Logging": "1.0.0-rc1-final-10092", "Serilog.Settings.Configuration": "2.0.0-beta-6", "frameworks": { "dnx451": { "dependencies": { "Serilog.Sinks.MSSqlServer": "3.0.48" } } Is that a problem in my configuration or it is simply not working with dnx core yet? Cheers!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 27 (15 by maintainers)

Most upvoted comments

I totally agree! Then I will focus to get first bits done. I saw the 4.0.0-beta83 but thanks for heads up!

@colin-young @mateusz-osojca is there a PR yet that is close for dev? @jansoren is looking for one related to #18

Hi There!

Thats the current state of my project.json:

"frameworks": {
    "net45": {
      "frameworkAssemblies": {
        "System.Data": "4.0.0.0",
        "System.Xml.Linq": "4.0.0.0"
      }
    },
    "dotnet5.4": {
      "dependencies": {
        "System.Data.Common": "4.0.1-beta-23516",
        "System.Xml.XDocument": "4.0.11-beta-23516",
        "System.Data.SqlClient": "4.0.0-beta-23516",
        "Microsoft.Extensions.Configuration": "1.0.0-rc1-final",
        "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final"
      }
    }
  },

  "dependencies": {
    "Serilog": "2.0.0-beta-507",
    "Serilog.Sinks.PeriodicBatching": "2.0.0-beta-700"
  }

I couldn’t really get that compiling for “dotnet5.2” as @colin-young mentioned as “Microsoft.Extensions.Configuration” and “Microsoft.Extensions.PlatformAbstractions” didnt support it. But I guess in terms of “Serilog.Sinks.PeriodicBatching” it is still ok right? @nblumhardt I 'm in the middle of moving to new configuration model and I will definitely need help on changing the DataAccess layer. Sorry for some delays here, from now on I will have more time to be consistent…