Saturday 11 October 2014

Method not found: IsVisualStudio2012ProInstalled()

Case
I just installed SSDT 2012 on top of SSIS 2012 with SSDT 2010, but when I want to run a package I get an error:

Method not found: 'Boolean Microsoft.SqlServer.Dts.Design.VisualStudio2012Utils.IsVisualStudio2012ProInstalled()'.
















Solution
Apparently the Microsoft.SqlServer.Dts.Design dll belonging to SSDT 2012 is not installed in the GAC during installation. The version belonging to SSDT 2010 is still in the GAC. On the left side the assembly before fixing this bug and on the right side the assembly after fixing this bug. Ironically the assembly from 2012 has a lower version than 2010. Dave found a solution for it.
Microsoft.SqlServer.Dts.Design dll before and after fixing the bug.

















1)  Close SSDT 2012
Close Visual Studio (SSDT) 2012.

2) Visual Studio Command Prompt
Open the Visual Studio Command Prompt as administrator (otherwise the gacutil will return an error). You can do this by right clicking the shortcut and then choose Run as Administrator.

3) Change Directory
Enter the following command to change the direcory to the PrivateAssemblies folder of SSDT 2012:
cd C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies

4) Run GACUTIL
Run GACUTIL with the following parameters to add the assembly from SSDT 2012 to the GAC:
gacutil/if Microsoft.SqlServer.Dts.Design.dll
Parameter /if will force the installation of this assembly regardsless of any existing versions of the assembly
gacutil/if Microsoft.SqlServer.Dts.Design.dll

















5) Open SSDT 2012
Now open SSDT 2012 and try running the package again to check the fix.


*UPDATE (see comment Alejandro Bello)*
If you didn't install SSDT 2010 then the GAC Util is located in a different folder. Start the regular Command Prompt as Administrator and then execute the following commands:

cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0a\bin\NETFX 4.0 Tools"

gacutil.exe /if "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.SqlServer.Dts.Design.dll"

Different location GacUtil





10 comments:

  1. So will the ever be fixed permanently for SQL Server 2012? Every time some update happens, I have to go back and redo this process. Or maybe it won't be resolved 'permanently' except by installing SQL Server 2014?

    ~Bruce

    ReplyDelete
    Replies
    1. For some people this is apparently only working temporarily. I have addressed the issue at Microsoft. If there is a more permanent solution I will post it here.

      Delete
  2. I get the error

    'gacutil' is not recognized as an internal or external command, operable program or batch file.

    My computer is Windows 7.

    ReplyDelete
    Replies
    1. Make sure you start the Visual Studio Command Prompt and not the regular Command Prompt. You can probably also add the gacutil path in the command. Something like: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil/if Microsoft.SqlServer.Dts.Design.dll

      Delete
  3. For SSDT-BI 2012 (a crippled VS 2012 that lacks said "Command Prompt" menu option):

    1. Command Prompt

    2. cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0a\bin\NETFX 4.0 Tools"

    3. gacutil.exe /if "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.SqlServer.Dts.Design.dll"

    4. Wait for "Assembly successfully added to the cache". Done!

    ReplyDelete
    Replies
    1. Thanks! You're correct. If you didn't install SSDT 2010 from the DVD/ISO you don't have the VS Command Prompt and gacutil is located in a different folder.

      Delete
  4. Hee Joost! Thanks for this blog! Alejandro, thank you aswell :). Your solution was the one that worked for me :).
    - Ronny

    ReplyDelete
  5. Thanks for taking the time to post this, it helped a lot in getting it fixed

    ReplyDelete
  6. Thanks a lot for this solution.

    ReplyDelete

Please use the SSIS MSDN forum for general SSIS questions that are not about this post. I'm a regular reader of that forum and will gladly answer those questions over there.

All comments are moderated manually to prevent spam.

Related Posts Plugin for WordPress, Blogger...