JasperFx / lamar

Fast Inversion of Control Tool and Successor to StructureMap
https://jasperfx.github.io/lamar
MIT License
568 stars 119 forks source link

Microsoft.Extensions.DependencyInjection.Abstractions dependency incorrect #170

Closed billrob closed 5 years ago

billrob commented 5 years ago

There seems to be some hard coded assembly version bound to 2.0.0.0. When I add EF 2.2.6 to my project it now uses 2.2.0.0 of Microsoft.Extensions.DependencyInjection.Abstractions, but Lamar is trying to load up 2.0.0.0.

Also for some reason assembly binding redirects aren't working, but I don't think that is on you.

Also I noticed the version is listed as 0.0.0.0 and there is no public key on the lamar.dll.

Assembly Binder Log Entry (7/11/2019 @ 6:34:45 PM)

The operation failed. Bind result: hr = 0x80131040. No description available.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under executable E:\services\KK362\KK362.WindowsService.exe --- A detailed error log follows.

=== Pre-bind state information === LOG: DisplayName = Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (Fully-specified) LOG: Appbase = file:///E:/services/KK362/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = KK362.WindowsService.exe Calling assembly : Lamar, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.

LOG: This bind starts in default load context. LOG: Using application configuration file: E:\services\KK362\KK362.WindowsService.exe.Config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Post-policy reference: Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///E:/services/KK362/Microsoft.Extensions.DependencyInjection.Abstractions.DLL. LOG: Assembly download was successful. Attempting setup of file: E:\services\KK362\Microsoft.Extensions.DependencyInjection.Abstractions.dll LOG: Entering run-from-source setup phase. LOG: Assembly Name is: Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 WRN: Comparing the assembly name resulted in the mismatch: Minor Version ERR: The assembly reference did not match the assembly definition found. ERR: Run-from-source setup phase failed with hr = 0x80131040. ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

jeremydmiller commented 5 years ago

I'm going to try to set a version range in the project to try to relax this. I can't lock Lamar into 2.2 of the abstractions though, because that just harms anybody who hasn't upgraded to ASP.Net Core v2.2

jeremydmiller commented 5 years ago

Range is set in a branch. Will be in the next release