Namotion.Reflection icon indicating copy to clipboard operation
Namotion.Reflection copied to clipboard

Loading the assembly fails with PowerShell Core 7

Open InspiringCode opened this issue 5 years ago • 4 comments

Whenever I try to call Add-Type -Path "D:\Test\Namotion.Reflection.dll" in a PowerShell session it fails with Could not load file or assembly 'Namotion.Reflection, Version=1.0.12.0, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102'.

The loading of a big .NET Core Project even with Entity Framework Core succeeds. Just the Namation.Reflection assembly cannot be loaded. Do you have any ideas what the issue could be? Any special dependencies or such? Some ideas that I could try?

InspiringCode avatar Aug 13 '20 16:08 InspiringCode

Strange, it works in the classic none-core powershell 5, but not in pwsh...

InspiringCode avatar Aug 13 '20 17:08 InspiringCode

Ok, this is really strange. I tried to build & publish the lib myself, same error. When I just change the Version in the csproj to 1.0.11 instead of 1.0.12 it works perfectly. Changing it pack to 1.0.12 -> same error. What the hell????

InspiringCode avatar Aug 13 '20 18:08 InspiringCode

Oooh. PowerShell 7.0.3 seems to also use Namotion.Reflection... At least on my machine there is a "C:\Program Files\PowerShell\7\Namotion.Reflection.dll"... And it is version 1.0.11 :( Is there anything I can do about it?

InspiringCode avatar Aug 13 '20 18:08 InspiringCode

PowerShell 7.0.3 seems to also use Namotion.Reflection

Its part of the ps core installation!?!

RicoSuter avatar Aug 26 '20 21:08 RicoSuter