Could not load file or assembly ‘Microsoft.VisualStudio.Tools.Applications.Core’

I was migrating SSIS packages from a SQL Server 2008 R2 server to a new SQL Server 2012.
When I loaded a package in the SQL Server Data Tools, I got the following error:

I was only getting this error when I was trying to upgrade a package with a Script Component in it.
When I tried to edit the script I also got the following error message:

Strangely enough, when I opened the same package on my computer, it worked fine.

After searching a while I found a solution to fix this issue.
The key is in the message “Cannot show Visual Studio 2010 Tools for Applications editor

When I looked at the “Program and Features” of my server I saw that the following components were installed

When I compared it to my computer “Program and Features”, I saw that an extra component was installed Microsoft Visual Studio Tools for Applications x86 Runtime 3.0

After my investigation, I found out that the problem is caused by the order in which you install SQL Server Integration Services 2012 and SQL Server Data tools.
So I played around and tested 3 different scenario”s:

  1. First Integration Services installation and secondly run the setup again to install SQL Server Data Tools

Actually, this was my original situation. I only installed Integration Services, but the customer also wanted the SQL Data Tools installed, so I added it afterwards.
When Integration Services was installed I saw that only one component was installed

Now, let”s install the SQL Server Data Tools. According to the installation wizard the Microsoft Visual Studio Tools for Applications 3.0 still needs to be installed (see picture below)

However, after the installation is finished, the Microsoft Visual Studio Tools for Applications Design-Time 3.0 have been added but the Microsoft Visual Studio Tools for Applications x86 Runtime 3.0 is still missing…

  1. First SQL Server Data Tools installation and secondly run the setup again to install Integration Services

I started again from a clean situation and installed first the SQL Server Data Tools. The Microsoft Visual Studio Tools for Applications Design-Time 3.0 and Microsoft Visual Studio Tools for Applications x86 Runtime 3.0 components have been installed.
As you might notice,the x64 Runtime is now missing…

No problem,let”s install Integration Services now. I expect that the Microsoft Visual Studio Tools for Applications x64 Runtime 3.0 will be installed since it was installed in my first test.
Well, suprisingly enough, it didn”t install it… The SQL Server Installation wizard saw that the Microsoft Visual Studio Tools For Applications 3.0 was already installed (see picture below)

And when I verified the “Program and Features”, the Microsoft Visual Studio Tools for Applications x64 Runtime 3.0 was still missing.

  1. Installation of SQL Server Data Tools and Integration Services at the same time

I started again from a clean situation and installed SQL Server Data Tools and Integration Services at the same time.
The SQL Server Installation Wizard detects that it still has to install the Microsoft Visual Studio Tools for Applications 3.0, which is a good thing.

Finally, both x64 and x86 Tools have been installed!

Now, let”s see if my package will upgrade now without any error?

YES, IT DID!!!

 

If you would like to have this issue fixed, please vote on the following link

https://connect.microsoft.com/SQLServer/feedback/details/776248/could-not-load-file-or-assembly-microsoft-visualstudio-tools-applications-core

23 comments on “Could not load file or assembly ‘Microsoft.VisualStudio.Tools.Applications.Core’
  1. I’ve had exactly the same issue.

    I eventually figured out I could get all the componenst installed by running some of the installers on the SQL2012 DVD

    redist/VSTA/designtime/VSTA_DT30msi
    redist/VSTA/runtime/x64/VSTA_RT30.msi
    redist/VSTA/runtime/x86/VSTA_RT30.msi

    We have to have both X86 and x64 runtimes as packages can be run in native 64 bit mode or using the 32 bit runtime

    Anyway once you have installed these you need to flush the .Net GAC (Global Assembly cache) you can do this by rebooting the machine, or as I did by just leaving it a couple of days and waiting for everything in the cache to expire. There is a command line method to flush the cache but it’s a PITA and involves deleting stuff and generally poking far more bits of the OS than I’m comfortable with, and its a prod server so I didn’t want to set too many alarm bells off in operations by rebooting a server.

    All seemed to spring into life after that. Though I did get some funny errors complaining the script hadn’t been compiled immediately after trying it. I assume that something lying around in the GAC was causing problems.

    AM going to drop this comment into the connect item

  2. I got the same error and I installed

    redist/VSTA/designtime/VSTA_DT30msi
    redist/VSTA/runtime/x64/VSTA_RT30.msi
    redist/VSTA/runtime/x86/VSTA_RT30.msi

    My problem was solved.
    Thanks STEVE POWELL.

  3. Thanks Pieter and Steve. I had the exact same issue, with the same scenario of installing SSIS originally, then going back and adding SSDT afterwards.

    Problem solved by installing VSTA x86 runtime from source as above (also rebooted server just to make sure).

    Thanks for the great write up!

    James

  4. Pingback: Script Task Editor in SSDT 2012 is crashing : Error 'Microsoft.VisualStudio.Progression.Actions.GetNodeAtSourcePosition' - mageorg - Site Home - MSDN Blogs

  5. Thanks for the info but unfortunately it didn´t worked for me. Instead start a clean instalation as you mentioned I removed the SQL Server Data Tools and Integration Services and then istall it again. Please tell me that I do not need to uninstall SQL server and repeat that again.. :) My guess is that the native client version installed is not updated, but when I try to install the new one, it shows a pop up message saying something like this “already found a higher version installed in the system, uninstall the previous one and retry to install this one” Ok, sounds easy, but where is this native client folder installed in my PC? I can´t figure out where this is located. Can anyone knows where this program/folder is located? I found something called library in SDK folder of SQL, and it appears to be that Native program, I remove that folder with the program and then I repeat the instalation with the same results :/ Honestly guys, I am tired of SQL server. How it is possible! a big structure like SQL has this kind of instalations problems? Anyway… no comments

    Many thanks,

    Marco

    • Hi Marco,

      You don’t need to uninstall SQL Server. Only the SSDT and SSIS.
      Can you check in Add/Remove programs if there are other Native Clients are installed? If so, try to remove these and re-install.

      Regards
      Pieter

  6. Hi! Thanks for this information, looks like it helped few people. I am getting a slightly different error, see below. I get that when I click ‘edit script’. I tried everything short of re installing SSIS and SSDT. I work with SSIS packages in 2005 and 2008, so both development environments are running fine on my machine. Not trying to set up 2012 and everything works except scripts. Any suggestions, ideas?

    ===================================

    Cannot show Visual Studio 2010 Tools for Applications editor. (Microsoft Visual Studio)

    ===================================

    Method not found: ‘System.String Microsoft.SqlServer.VSTAHosting.IVstaHelper.get_TemplateFilePrefix()’. (Microsoft.SqlServer.ScriptTask)

    ——————————
    Program Location:

    at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.get_ProjectTemplatePath()
    at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTaskUI.ShowIDE()

    • Hi,

      I found this discussion Looks like 2 different version on one server doesn’t really work…

      Regards
      Pieter

  7. You rock! I had the same issue, I then started with a fresh (virtual) PC, I ran SQL Server 2012 installer, and installed DB engine, SSIS and SSDT at the same time. Now everything works..

  8. Hi Pieter, this is great. Hopefully it will solve my issue. Does the install need a reboot, as I am having this issue on a production server and would need to arrange downtime if it does.

    Many thanks again,
    Richard.

    • Hi Richard,

      As far as I remember, I don’t think a reboot was necessary.
      If you look at the other comments, looks like a few people did a reboot just to be sure, but I don’t think that was necessary.

      Regards
      Pieter

  9. Hi Pieter,

    Thanks for your response. I have installed the missing .msi file, I can now view scripting tasks and I did not need to reboot the server.

    Richard.

  10. Pieter,

    Thanks for the thorough analysis. I was getting a variety of script task-related errors during package upgrades, and the missing installations turned out to be the source.

    Steve – thanks for the location of those MSIs. If only every odd technical glitch had this clear of an article to accompany it.

  11. Hi Pieter,

    This worked fine,Thanks
    and once the features are installed should we apply Service pack to match the patch version of sql server to that of already existing version of newly added SSDT ,SSIS.

  12. Pingback: BI Hell - 通过SSIS监控远程服务器磁盘空间并发送邮件报警

  13. Good exploration!
    You can install these components manually from SQL’s DVD from forlder
    \redist\VSTA\runtime\x86
    \redist\VSTA\runtime\x64
    right-click on .msi file and select “install”.

Leave a Reply

Your email address will not be published. Required fields are marked *