VSTO file type mapping is lost

Some people have been running into this issue with VS2008 Beta 2 as posted on the MSDN forum.

I am posting a workaround here for everyone's reference. When you change the default program for the .vsto file extension, VSTO solutions cannot be deployed again. You will have to reset the default handler for .vsto file back to VSTO Execution Engine.

For Windows XP:

Right-click a .vsto file and select "Open With...". In the list of the programs you should be able to see "Visual Studio Tools for Office Execution Engine Component (VSTOEE)". Please select it and make sure you select the checkbox that says "Always use the selected program to open this kind of file". In case you do not find the VSTOEE component in the list of the available programs follow the steps below:

For Windows Vista (and sometimes Windows XP):

You will need to add a registry entry to show the VSTOEE component in the Open With.. dialog box.

Copy and paste this into notepad and name the file vsto.reg:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\bootstrap.vsto.1\shell]

[HKEY_CLASSES_ROOT\bootstrap.vsto.1\shell\open]
@=""

[HKEY_CLASSES_ROOT\bootstrap.vsto.1\shell\open\command]
@="rundll32.exe \"C:\\Program Files\\Common Files\\Microsoft Shared\\VSTO\\vstoee.dll\",InstallVstoSolution %1"

[HKEY_CLASSES_ROOT\.vsto]
"Content Type"="application/x-ms-vsto"
@="bootstrap.vsto.1"

[HKEY_CLASSES_ROOT\.vsto\bootstrap]
@="bootstrap.vsto.1"

Now double-click the registry file to add it into the registry.

Once it has been added you might need to restart explorer.exe so that it picks up the changes. Now you should see the VSTOEE component being listed in the Open With... dialog box. Use it as the default program for the .vsto extension. Everything should work as expected now.

Hope this helps!

Comments

  • Anonymous
    October 18, 2010
    Hi Thanks for you usefull article. But, What about computers which doesn't support this extension? I have a PC running windows XP and nothing about .Net Framework is installed. I did what you said, but still can't install my addin... Do you think I need to install .Net Framework?

  • Anonymous
    October 18, 2010
    Hi TJ, I believe this was only an issue in the Beta version of the product. This should have been resolved thereafter. You will need both the .NET framework and the VSTO runtime to get this to work. -Nikhil