Recently encountered a problem, open VS2013 and SQL Server2014 will be an error message, the following errors:
Used to be good, restart the machine also do not, can open two vs, then open a third vs or will error, Baidu no fruit, or Google found a solution, in this record.
The reason is that I recently installed MySQL, environment variables in the number of 2,181 characters, the characters are too long, delete the non-important environment variables, the number of characters dropped to 1849 (the number of characters within 2048), open VS2013 and SQL Server, everything is OK.
MySQL-related environment variables, indeed too lengthy ...
C:\Program Files (x86) \mysql\mysql Fabric 1.5 & MySQL Utilities 1.5\; C:\Program Files (x86) \mysql\mysql Fabric 1.5 & MySQL Utilities 1.5\doctrine extensions for Php\
Refer to the workaround:
I had exactly same problem. Symptoms:
-unable start Sql Server Managment Studio and Visual Studio SP1 with above message "Exception has been thrown .... " (VS2012 also installed)
-Missing icons for Windows Explorer in taskbar and icons for some system tools (Services, Event Viewer), unable to STA RT Windows Explorer Clicking to shortcut on taskbar
-Temporary solution terminating Explorer.exe and re-execute I T using Task Manager working for me, only to next RDP session (Connection/disconection) or Installing/uninstallin G any application
-before re-executing explorer.exe is PATH variable in cmd window empty (or contains only user Specific setting)
The reason of problem in my environment is too long environment variable PATH (2312 characters) , after Shorten bellow 2048 characters the problem were solved.
Hope help you,
Eduard Koucky.
Problem Link: https://social.msdn.microsoft.com/Forums/vstudio/en-US/0902665a-fefe-47f0-9bfe-904a57fdd0c6/ Visual-studio-2012-and-2010-both-fail-with-exception-has-been-thrown-by-the-target-of-an?forum=vssetup
Visual Studio 2013 Open newspaper exception "Exception has been thrown by the target of an invocation"