Stamattina mi sono imbattuto in un errore strano: volendo editare una macro in Visual Studio 2010 (con SP1 installato) mi è saltato fuori questo errore:
'Cannot load the recording macro project 'MyMacros; for the following reason: Server Execution Failed. Would you like to recreate it?'
In precedenza avevo già inserito macro personalizzate e quindi l’errore mi è sembrato un po’ strano.
Il solito Google mi ha fornito la risposta che ho trovato qui: http://connect.microsoft.com/VisualStudio/feedback/details/596422/vs2010-crashes-when-trying-to-edit-a-macro
In particolare la soluzione alternativa che riporto qui è quella che nel mio caso ha risolto il problema:
On computers on which Visual Studio 2008 or SQL Server 2008 is installed and Visual Studio 2010 has been uninstalled and then reinstalled, using the Visual Studio Macros IDE may cause Visual Studio to crash
Uninstalling Visual Studio 2010 also removes the Visual Studio Macro Tools package. If the computer also has Visual Studio 2008 or SQL Server 2008, then reinstalling Visual Studio 2010 does not reinstall the Visual Studio Macro Tools package. This causes an error when the Macros IDE is started, and Visual Studio crashes if you try to recreate the MyMacros.vsmacros project.
To resolve this issue:
1. Delete the following file:
* On a 64-bit operating system: "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\IDE\1033\Microsoft.VSDesignerUI.dll"
* On a 32-bit operating system: "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\1033\Microsoft.VSDesignerUI.dll"
2. On the Add or Remove programs page, select Uninstall/Change Visual Studio 2010 and then click Next.
3. Select Add or Remove features.
4. Clear and then re-select any of the features in the list. This causes the update state to be enabled.
5. Finish the Setup wizard. Visual Studio Macro Tools should be installed.