exception has been thrown by a target of invocation in Visual Studio 2013
Google search and get the answer.Answer
My environment was too long environment variable PATH, after shorten bellow 2048 characters the problem was solved.
- Open C:\Windows\System32\SystemPropertiesAdvanced.exe
- Open Advanced > Environment Variables.
- Under System variables, find the "Path" entry.
- Copy the values inside.
- 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"
- 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.