简体   繁体   中英

VSTO problem - cannot create visual studio excel workbook project

When I try to create a Excel 2007 Workbook project, in Visual Studio 2008, I get the following errormessage:

Project cannot be created because the "Excel Visual Studio Design-Time Adaptor Add-in" is not working correctly. Excel might have disabled the add-in or made it inactive, or all add-ins might be disabled in your Trust Center settings. Check the add-in status in Excel Options. If the add-in is active and enabled, reinstall or repair Visual Studio Tools for Office.

I have verified that the add-in is not inactive or disabled and I have tried to repair and uninstall/reinstall VSTO several times.

What to do?

Just in case you haven't checked the trust settings, this MSDN page describes how to.

I came across this on a MSDN forum:

For the repair to work, you'll have to run the VS Command Prompt with Admin Priviledges (right click, run as administrator). Then run this command line:

C:>AddinUtil -AddInRoot:"%CommonProgramFiles%\\Microsoft Shared\\VSTA\\AppInfoDocument" -Rebuild

If it still doesn't work, you may also have a corrupt pipleline store, which can be fixed like this:

C:>AddinUtil -PipelineRoot:"%CommonProgramFiles%\\Microsoft Shared\\VSTA\\Pipeline" -Rebuild

You'll get one warning from that command but that is expected.

Failing that, I think you will have to run a repair on the Visual Studio 2008 installation (put the installation DVD in a drive, and select the repair option).

I'd set Excel 2003 to open XLS files by default. I saw the same error message you got until I repaired Office 2007 from the Add/Remove Programs menu.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM