不是有效的Office加载项 [英] Not a valid Office Add In

查看:2017
本文介绍了不是有效的Office加载项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS 2008和VSTO开发了一个新的Office 2007插件.之后我去 Office-> Excel选项-> AddIns-> COM AddIns和GO ...如果我选择创建的.dll,则会收到错误消息

I developed a new Office 2007 addin using VS 2008 and VSTO. after this I go to Office->Excel Options->AddIns->COM AddIns and GO... If I select the .dll which I ve created I get the error

'<path>' is not a valid Office Add In.

如果我在开发机上使用Visual Studio 2008运行它,则它可以正常工作,并且可以看到该加载项.

If I run it using the Visual Studio 2008 at my development machine, it works fine and I see the add-in.

我搜索了很多帖子,但没有找到解决方法.

I searched so many posts but didn't get a solution.

推荐答案

Excel一直拒绝该加载项,所以对我来说,解决方案是直接通过注册表进行.

Excel kept rejecting the Add-In, so the solution for me was doing it directly via the registry.

将以下文本另存为.reg文件,替换清单路径和FriendlyName以适合您的PROJECT,然后双击reg文件以将注册表项添加到注册表中.

Save the below text as a .reg file, replace the Manifest path and FriendlyName to suit your PROJECT and double click the reg file to add the key to the Registry.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\PROJECTExcelAddIn]
"Manifest"="file:///C:\\TFS\\Pg.PROJECT\\PROJECTExcelAddIn\\Src\\PROJECTExcelAddIn\\PROJECTExcelAddIn\\bin\\Debug\\PROJECTExcelAddIn.vsto"
"FriendlyName"="PROJECTExcelAddIn"
"LoadBehavior"=dword:00000003
"Description"="PROJECTExcelAddIn - Excel add-in for PROJECT."

这篇关于不是有效的Office加载项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆