I have a C# PowerShell module coded for .NET 6.0. It depends on a C# library that started life in the same solution. In that configuration, the PowerShell code imported just fine. But then I decided people might want only the internals of my project and not the PowerShell stuff. So I split them out so the PowerShell was in one solution and the library it depends on in a second one. The second library, let's call it just Core, is now on NuGet and I was able to compile the PowerShell code against it just fine. But when I run
import-module against the compiled PowerShell module, it says it can't find the Core library.
What's going on? I tried to import the module from a stand-alone PowerShell prompt outside VS. It was VS 2022 that compiled both projects. My tests are being run on a Windows 10 Pro machine.