So, i have a project i was developing in Vs2012 on a Windows 8.1 host. This project is one that creates compiled cmdlets and so has a reference to System.Management.Automation. The .NET project is targeting Framework 4.0.
I upgraded my dev host to Windows10. Windows 10 has PS5.0, which targets .NET 4.5.
How would i create a compiled cmdlet (aka module) that targets .NET 4.0? Every time i add a reference to System.Management.Automation, i get the windows assembly that targets .NET 4.5.
However, since 4.5 is a drop-in replacement for 4.0, and as i understand an app targeting 4.0 can run properly when 4.5 is installed, i want to make my compiled cmdlet targeting 4.0. This will allow me to distribute this module to both Win8 and Win10 hosts.
I hope i explained this issue correctly.