serilog-archive / serilog-sinks-azuredocumentdb

A Serilog sink that writes to Azure DocumentDB
Apache License 2.0
17 stars 15 forks source link

Getting “The module was expected to contain an assembly manifest.” when configuring Serilog logging in my API project #69

Closed ArshathS closed 6 years ago

ArshathS commented 6 years ago

My aim is to Configure Serilog logging. After installing following nuget packages i'm getting an error.

Serilog https://github.com/serilog/serilog Serilog DocumentDB https://github.com/serilog/serilog-sinks-azuredocumentdb The error is attached below image

I get this error after installing Serilog.Sinks.AzureDocumentDB. image

saleem-mirza commented 6 years ago

Please try uninstalling and installing it again. Let me know if it still doesn't work

ArshathS commented 6 years ago

@saleem-mirza I have already done that. Please suggest any other options.

saleem-mirza commented 6 years ago

Well, that's not good. Try https://www.nuget.org/packages/Serilog.Sinks.AzureDocumentDb/3.8.1-dev-00162

saleem-mirza commented 6 years ago

However, I'm not able to reproduce it. Please see attached .net core project. You'll need to restore dependencies.

cs_demo.zip

ArshathS commented 6 years ago

Hi saleem-mizra

My POC is working as expected but when it comes to my real API project it is not working and giving above error page.

Please find the POC which i'm following. consoleappforserilog.zip

ArshathS commented 6 years ago

Exception Details : System.BadImageFormatException: Could not load file or assembly 'file:///C:\VSO\API\XXXX.API.REST\bin\DocumentDB.Spatial.Sql‌​.dll' or one of its dependencies. The module was expected to contain an assembly manifest

ArshathS commented 6 years ago

I have fixed the problem. I reinstalled all the nuget packages and consolidated to the same version. (All existing nuget in my project)