Home > MS crm 2013 > Failed to get location of Visual Studio from registry

Failed to get location of Visual Studio from registry


I know there are lot of post out there how to get CRM developer tool to get work in Visual studio 2013. But today i got strange issue when i tried to add new workflow class to my SolutionPackage. WHenever i try to create new plugin or workflow , it was throwing as error ” Failed to get location of Visual Studio from registry” .It used to work fine until yesterday.

When i googled with this error , i could not find any post about this error specific to CRM developer tool but someone mentioned this issue is related to registry key mismatch for the visusal studio with the right registry key entry to fix the issue 

Copy below text and save it as .reg file and run it to update registry with right values. After running this registry update everything worked fine. 
******************************************
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS]
“ProductDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\”
“MSMDir”=”C:\\Program Files (x86)\\Common Files\\Merge Modules\\”
“VS7EnvironmentLocation”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\devenv.exe”
“EnvironmentPath”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\devenv.exe”
“EnvironmentDirectory”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\”
“VS7CommonDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\”
“VS7CommonBinDir”=””

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS\BuildNumber]
“1033”=”12.0″

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS\Pro]
“ProductDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\”

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS\VSTD]
“ProductDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\”

*********************************************************************************************

If above fix did not fix the issue check below settings as well in your machine ..

edit C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe.config,

add the following lines:

***************************************************************************************************

<!– CRM 2013 VS install –>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.Windows.Design.Host” publicKeyToken=”b03f5f7f11d50a3a” culture=”neutral” />
<bindingRedirect oldVersion=”4.0.0.0-4.1.0.0″ newVersion=”4.2.0.0″ />
</dependentAssembly>
<!– /CRM 2013 VS install –>

*****************************************************************************************************************

Advertisements
  1. SuperDooper
    October 9, 2014 at 3:17 pm

    What do you do if you don’t have the file in C:\\Program Files (x86)? I have this on a different drive, and I’m uncomfortable searching out and changing registries.

    • October 21, 2014 at 9:33 pm

      If you dont find the file just copy file from other drive to c:\ drive

  2. Devin
    December 9, 2014 at 2:53 am

    Where specifically do I embed the copied code into the devenv.exe.config code?

    • December 9, 2014 at 7:32 pm

      you have added code in devenv.exe.config file. Usually this file exists folder
      C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe.config

  3. April 6, 2015 at 5:53 pm

    I did the registry edit and the edit C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe.config, and still doesn’t work for me, any advise?

  4. Arjun Babu
    September 27, 2016 at 12:08 pm

    Hi Chitra,

    I am following the steps mentioned above to setup CRM Developer toolkit for Visual Studio 2013.

    I am able to do the below steps:

    1. Create New Project

    2. Connect to Dynamics CRM Server and to the correct Organisation and Solution. (Actually can even browse CRM entities in CRM Explorer)

    After that I get the below error which I am not able to fix

    “System.Exception: general exception (expection from HRESULT: 0x80131500) at EnvDTE100.Solution4.AddFromTemplate(String FileName, String Destination, String ProjectName, Boolean Exclusive) at Microsoft.CRMDeveloperTools.TemplateExtensions.CRMTemplateExtension.RunFinished()”

    Will be helpful if anyone can help me with this issue please?

    Thanks,

    Arjun

  5. Arjun Babu
    September 28, 2016 at 4:42 am

    Hi Chitra,

    I am following the steps mentioned above to setup CRM Developer toolkit for Visual Studio 2013.

    I am able to do the below steps:

    1. Create New Project

    2. Connect to Dynamics CRM Server and to the correct Organisation and Solution. (Actually can even browse CRM entities in CRM Explorer)

    After that I get the below error which I am not able to fix

    “System.Exception: general exception (expection from HRESULT: 0x80131500) at EnvDTE100.Solution4.AddFromTemplate(String FileName, String Destination, String ProjectName, Boolean Exclusive) at Microsoft.CRMDeveloperTools.TemplateExtensions.CRMTemplateExtension.RunFinished()”

    Will be helpful if you can help me with this issue please?

    Thanks,

    Arjun

  1. June 23, 2015 at 7:31 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: