openalm / Extension-UtilitiesPack

Release Management utility tasks
Other
34 stars 38 forks source link

System.IO.FileLoadException: 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 information. at Microsoft.SqlServer.Management.PowerShell.GetScriptCommand.ProcessRecord() at System.Management.Automation.CommandProcessor.ProcessRecord() #86

Closed NkululekoMakhubu closed 6 years ago

NkululekoMakhubu commented 6 years ago

I attached a PowerShell script that has an invoke-sqlcmd and I received the error above. It's not very detailed as you can see but what's concerning is that I can't tell if this is a Visual Studio Online issue or My Script.

--Script-- Invoke-SqlCmd -inputfile "" -serverinstance $SQLServer -database ""

harshil93 commented 6 years ago

Looks like a dll loading issue. Try the same command on the machine where the agent is running

NkululekoMakhubu commented 6 years ago

Yes, this runs perfect on our local server but when running the script on Visual Studio online that exception pops up.