-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using MSSQLServer sink with dnx451: Could not load file or assembly Serilog.FullNetFx #15
Comments
Hi - thanks for the note. The SQL server sink hasn't been ported to .NET Core yet - any assistance with this would be appreciated if you are comfortable with sending a PR. Thanks again! |
Sure! I started looking into this. Looks like the plan is that support for using csproj in xproj and vice versa will be part of .NET Cli (in the RC2?) which is not there yet. Just after further reading PCLs are also the option here, as the previous aproach is really more the code sharing. |
I think on |
Done. Default branch on the repo is now |
Ha. I was just looking at this the other day and nearly started working on it. I'll hold off for now, but @mateusz-osojca feel free to ping me if you want some help. I see 2 main things that need to change:
But I've only made a cursory examination of the code. As I said, I'm happy to help in any way I can. |
Hi @colin-young ! |
I am willing to help with the conversion to xproj. As i encountered this issues just now :) How can i help? |
Hi Guys! So here I'm getting a bit frustrating issues. This is important part of the project.json "frameworks": { And ofcourse yet I didnt resolve issues that @colin-young mentioned about the DataTables but that is ongoing... But my problems now are I'm having quite a few of those:
With different type even including Object type. Can you guys help out? My idea is that I'm mixing something with dependencies versions Cheers! |
@mateusz-osojca, one thing I'll suggest is adopting the frameworks supported in Serilog:
You'll probably only need one of 5.4 or 5.1. Both were needed in Serilog due to differences in how features were implemented in each platform, but I don't think we're going to get into that here. We should aim for 5.1 support, assuming that's possible. You should only include EDIT: it looks like |
@mateusz-osojca Just wondering if you've had a chance to try out my suggestions about the frameworks. If you've got a fork going, I can take a look at it. |
@colin-young .... I definitely did. And that was good point. I was offline for 2 weeks but I'm back to the topic this weekend. I'll update you guys Monday / Tuesday. |
Just wanted to make sure you weren't stuck or anything. As I said before, feel free to ping me with any questions. We did our own implementation here, but it's pretty specialized to our needs. There is probably stuff that would be helpful for a more generic implementation though. I just haven't had a chance to completely sort through it yet. |
PR #18 covers the package versions for this sink on .NET 4.5 with Serilog 2. It'd be a useful stepping stone to make that change but will not be of benefit if you're about to drop this one in. Let me know if I should pick up and help with the PR :-) Cheers! |
Hi There! Thats the current state of my project.json:
I couldn't really get that compiling for "dotnet5.2" as @colin-young mentioned as |
That's unfortunate, We can take a look at that as a separate PR later if necessary. |
@colin-young @mateusz-osojca is there a PR yet that is close for dev? @jansoren is looking for one related to #18 |
@merbla Mine needs around 1 more week, I guess... |
Could we start a new branch with reference to Serilog 2.0.0-beta and create a beta version of serilog-sinks-mssqlserver? It would make my life a little easier :-) |
@nblumhardt : short question about passing in existing Connection string into Serilog:WriteTo.
and basically in our extension method that reads the Connection string out of configuration it is pretty hard to reference exisintg Connections string.... Thats because in the Serilog.Settings.Configuration you're injecting only "Serilog" out of the configuration by this line:
Cheers! |
@mateusz-osojca that's a good question - it may be one to raise on the serilog-extensions-configuration repository and treat separately. Will need to give the options some thought, anyway... |
@nblumhardt You mean to have actually another extension method which responsibility will be only to provide the configuration? While I'm working on this I get yet another question regarding the configuration.
Which actually doesnt seem to work with current implementation of Serilog.Settings.Configuration. |
Hi @mateusz-osojca - no, I'm not sure what direction we'd take to solve the connection string issue. I think ideally we'd get a basic version (e.g. that requires literal connection strings and probably doesn't cover all scenarios) out in the wild, then pick up the loose ends via some discussions on the configuration repo. Once the initial version here is done, the work can also be assisted by other contributors, which should speed things up and bring some more ideas to the table. What do you think? Just a note, there's a .NET 4.x-only 2.0 package now published: https://www.nuget.org/packages/Serilog.Sinks.MSSqlServer/4.0.0-beta-83 - thanks @jansoren. Cheers! |
I totally agree! Then I will focus to get first bits done. I saw the 4.0.0-beta83 but thanks for heads up! |
@nblumhardt , @colin-young I'm just ready with first implementation. Just need to polish it a bit and will share on comming days. Just so you get and idea, I did first try of using the new Microsoft.Extensions.Configuration model (that yet doesn't cover all the cases, as you can follow from above messages). I had to replace SqlBulkCopy with own implementation of SqlCommand. Quite some changes and I will most probably need assistance with changes to scripts/ build... |
Hi there! I made a first checkin to dev. I know it requires quite a lot of work..... But the general idea: |
With project.json support now in master I think it's ripe for someone to tackle .NET Core support; I think this ticket has too much history in it now to be clear on what we're aiming for so I'll close it, but a PR with .NET Core support is still very high on our "most wanted" list. Cheers! |
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!
The text was updated successfully, but these errors were encountered: