Could not load file or assembly 'Audit.NET, Version=15.3.0.0'
See original GitHub issueHellow dear.
I’m trying to use Audit.NET 15.3 and also Aduit.EntityFramework 15.3
My project version is: id=“Audit.EntityFramework” version=“15.3.0” targetFramework=“net48” /> id=“Audit.NET” version=“15.3.0” targetFramework=“net48” /> id=“EntityFramework” version=“6.4.4” targetFramework=“net48” /> id=“Microsoft.AspNet.WebApi” version=“5.2.7” targetFramework=“net48” /> id=“Microsoft.AspNet.WebApi.Client” version=“5.2.7” targetFramework=“net48” /> id=“Microsoft.AspNet.WebApi.Core” version=“5.2.7” targetFramework=“net48” /> id=“Microsoft.AspNet.WebApi.WebHost” version=“5.2.7” targetFramework=“net48” /> id=“Microsoft.CodeDom.Providers.DotNetCompilerPlatform” version=“2.0.1” targetFramework=“net48” /> id=“Newtonsoft.Json” version=“12.0.3” targetFramework=“net48” />
But when it will load the context I get the exception:
Exception: Could not load file or assembly 'Audit.NET, Version=15.3.0.0, Culture=neutral, PublicKeyToken=571d6b80b242c87e' or one of its dependencies. The manifest definition of the localized assembly does not match the assembly reference. (Exception of HRESULT: 0x80131040)
Stacktrace: at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters() at System.Reflection.RuntimeMethodInfo.GetParametersNoCopy() at System.Reflection.RuntimePropertyInfo.GetIndexParametersNoCopy() at System.Reflection.RuntimePropertyInfo.GetIndexParameters() at System.Data.Entity.Internal.DbSetDiscoveryService.<>c.<GetSets>b__4_1(PropertyInfo p) at System.Data.Entity.Internal.DbSetDiscoveryService.GetSets() at System.Data.Entity.Internal.DbSetDiscoveryService.InitializeSets() at System.Data.Entity.DbContext.InitializeLazyInternalContext(IInternalConnection internalConnection, DbCompiledModel model) at System.Data.Entity.DbContext..ctor(String nameOrConnectionString) at Audit.EntityFramework.AuditDbContext..ctor(String nameOrConnectionString)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
The conflict is that you use the same assembly name as the Audit.NET library… Have your own name for your assemblies.
https://github.com/renandegrandi/Audit.NET/blob/0e48d0e17af9244e12827996daf0e42d14a82b4e/Audit.NET/Audit.NET.csproj#L16
<AssemblyName>Audit.NET</AssemblyName>
Thank you very much, I used this namespace because it was just a poc, I will perform the test again.