Runnin Framework 4.0 with Powershell
- by Mike Koerner
I had problems running scripts with Framework 4.0 assemblies I created. The error I was getting was Add-Type : Could not load file or assembly 'file:///C:\myDLL.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. I had to add the supported framework to the powershell.exe.config file.<supportedRuntime version="v4.0.30319"/>I still had a problem running the assembly so I had to recompile and set "Generate serialization Assembly" to off.