Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell DSC & Runtime Error Hell

$
0
0

I've been banging my head against the wall with DSC for several months now.  I've made good progress but this mixed mode assembly message is haunting me, it's inconsistent, and really limits my options with interfacing with SQL Server.  I'm not sure what else I can try, the only thing that works is changing a registry value that forces ALL code to use v4 of the runtime.  Changing powershell.exe.config or powershell_ise.exe.config doesn't solve this issue.  

This is what I get when I try to just execute a ps1 script.  I had to pick a ps1 script to execute as DSC isn't dynamic, thus I'm leaving the script to handle the dynamic work.  It works, but some scripts which run osql seem to work just fine, and others bomb out with this run time crap.

"failed to execute Set-TargetResource functionality with error message: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration informati


Viewing all articles
Browse latest Browse all 21975


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>