Click here to Skip to main content
13,800,290 members
Rate this:
Please Sign up or sign in to vote.
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 17-Aug-16 6:43am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.181214.1 | Last Updated 17 Aug 2016
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100