Runnin Framework 4.0 with Powershell

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 depend
encies. This assembly is built by a runtime newer than the currently loaded run
time 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.
Print | posted on Thursday, May 31, 2012 2:23 PM