Closed yankun closed 8 months ago
Better to log this on stackoverflow.com as anyone watching this repo is going to be watching the serilog
tag there too, and there's much better reach for people looking to diagnose similar issues in the future when it gets worked out there - be sure tho include relevant code and/or config snippets to convey how you've arranged things.
Feel free to post a link here when done.
Hi, I've encounter following problem:
I'm maintaining a solution which contains multiple projects being executables. The solution is using centralized package management. I'm publishing all of the projects into the same folder, to avoid duplication of all dlls involved. This worked great so far.
For now, all projects used the same sink, a file sink. Now one project is also using a console sink and that seems to be a problem.
If I start one of the projects only having a file sink, I will get following exception:
The failing project has no reference to the console sink (and no such sink configured), but as everything is copied into the same directory, the dll is available. If I delete the dll, or adding a reference to it for the related project, everything works. So this only happens, if the project doesn't reference the sink in any way, but the dll is yet available in the applications folder.
What could cause this? Also I think it is strange, that Serilog tries to load assemblies not being required by the provided logger configuration.