I have a PowerShell module (.NET assembly) that references the Autofac v3.5.2 and Autofac Configuration v3.3.0 libraries. When I load this module in PowerShell:
PowerShell.exe -NoExit -Command "& {Import-Module -Name .\MyModule.dll }
PowerShell opens, but displays the error:
"Could not load file or assembly 'Autofac, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified."
However, making the same Autofac references from within a Forms or WPF app does not result in an error - everything loads correctly. Note that both the module and UI apps invoke AutoFac Configuration code - they aren't just making reference to those two libraries.
I double checked all the assembly references and they're all set to "Specific Version=False". What then about PowerShell is telling it to require a specific version of the assembly?