Click here to Skip to main content
15,742,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am running the following PowerShell command:

invoke-sqlcmd -Server <servername> -Database <databasename> -Query "SELECT @@VERSION;"

On execution an error message is produced:

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.

What I have tried:

I have tried running the command with a Visual Studio Power Shell Script project and using the Power Shell ISA but to no avail.

I have tried number variations of setting the PowerShell configuration files, but to no avail. I don't know what 'additional configuration' is required.

I'm using Visual Studio 2015 Update 3, Power Shell V3 & SQL-Server 2014 Developer Edition, all on Windows 7 Professional.

Has anyone any suggestions?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900