Friday, 19 February 2010

Cannot load macro project error

After moving 'My Documents' folder to a different drive, I started getting an error when loading the macro's explorer window. The error was:

Cannot load macro project '' for the following reason:

'C:\Users\\Documents\Visual Studio 2008\Projects\VSMacros80\Samples\Samples.vsmacros' is an invalid or inaccessible macro project file

The problem is when you move your documents folder, this updates the environment variable %USERPROFILE%, but the macro's path for Visual Studio are stored in the registry.

Searching the registry I found the following two keys which had a 'path' value, referencing the C:\.


To solve, change the 'path' values in the above keys to your new location and restart Visual Studio.


Anonymous said...


Anonymous said...

Thank you Jason!

Heike Triebenbacher said...

In the case, that %USERPROFILE% wasn't changed, check if %TEMP% and/or %TMP% are changed and there's enough disk space there.

I have the situation, that I use a RamDisk for temporary files and after a reboot the size wasn't set correctly. It results in the same error as described above.