exception has been thrown by a target of invocation in Visual Studio 2013

不想你离开。 提交于 2019-12-05 01:20:16

Google search and get the answer. Answer

My environment was too long environment variable PATH, after shorten bellow 2048 characters the problem was solved.

  1. Open C:\Windows\System32\SystemPropertiesAdvanced.exe
  2. Open Advanced > Environment Variables.
  3. Under System variables, find the "Path" entry.
  4. Copy the values inside.
  5. Study the contents of path and lookup some path that is long and repeat many times. the purpose is replace it with another variable.

6, Add a new system variable entry that represent the entry found in #5.
In this case "C:\Program Files\Microsoft SQL Server" repeated 10 times , so it is my target to be tackled


%sql% for
"C:\Program Files\Microsoft SQL Server"

  1. Update the path in the path entry found in #3. such as

before:
c:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;

after
%sql%\Client SDK\ODBC\110\Tools\Binn\;

right click on VS Icon goto->properties->Shortcut->Advance-> Check 'Run As Administrator'. Now you have done you can normally open VS.

I am ran into this problem after installing Visual Studio on Windows 7. Both Visual Studio and SSMS returned the same error. My path length was under 2000 characters with no spaces between paths.

I reinstalled .Net framework and both applications started to work again.

I had the same problem and my path length was well under 1000 characters. Before trying to reinstall Visual Studio I tried a simple reboot which fixed my problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!