Office 2003 添加在 Visual Studio 2005 Professional、Win XP 中使用 VSTO 2005 SE 和 C#
我使用 VSTO 2005 SE 在 C# 中开发了 Word 2003 的插件。加载项在“帮助”按钮附近创建一个名为“国际项目”的按钮。加载加载项后,它会从 Sharepoint 2007 库获取一些数据,并根据这些数据,单击“国际项目”菜单中的按钮时,它会为正在运行的文档生成一些自定义属性。在我开发的机器上,Add In 工作得很好。我尝试在解决方案中创建一个安装项目,以便可以在其他计算机上安装加载项。我使用此处的说明创建了安装程序: http: //msdn.microsoft.com/en-us/library/cc136646(v=office.12).aspx , http://blogs.msdn.com/b/vsto/archive/2008/12/17/deploying-office-2003-solutions-with-windows-installer-mary-lee.aspx 以及许多其他类似的网站。我遇到的问题是,当我在用户计算机上运行安装程序时,安装程序运行良好,日志或事件查看器中没有错误,注册表看起来很好,文件被复制到中指定的地址安装程序中,该加载项出现在“添加/删除程序”中,但在启动 Word 时不会加载,并且不会作为 COM 加载项出现在 Word 中。 SetSecurity 项目我从 VSTO 2005 SE Runtime Sample V3 中获取它,将其添加到我的解决方案中并将输出插入到我的安装项目中。我仍然认为这是 Office 和我的加载项之间的信任问题。 Office 的 PIA 存在于汇编中,并且 VSTO 接缝要正确安装。我还创建了另一个项目,它在启动和关闭时仅显示一个 MessageBox,并且可以在用户计算机上安装并正常工作。我注意到一些奇怪的事情是,当我构建项目时,没有创建 .vsto 文件,但有一个 .vsto.manifest 文件,我在论坛上读到,vsto 运行时可能会尝试使用 .net 1.1 而不是 2.0两者都已安装,但我安装了一个补丁来解决这个问题,还有一个问题是 Visual Studio 2005 可能有一些问题,我也找到并安装了一个补丁,但这些都没有解决我的问题。在过去的两周里,我一直在努力并尝试各种解决方案,但没有任何结果。您是否有为 Office 2003 加载项创建设置的经验?如果有人这样做,请帮助我! 谢谢你!
I have developed an Add In for Word 2003 in C# using VSTO 2005 SE. The Add In creates a button near the Help button called International Projects. When the Add In is loaded, it gets some data from a Sharepoint 2007 Library and based on that data, when a button in the International Projects menu is clicked, it generates some custom properties for the running document. On the machine that I developed the Add In it work perfectly. I tried to create a Setup Project in my solution so that I could install the Add In on other machines. I created the Setup using the instructions from here: http://msdn.microsoft.com/en-us/library/cc136646(v=office.12).aspx , http://blogs.msdn.com/b/vsto/archive/2008/12/17/deploying-office-2003-solutions-with-windows-installer-mary-lee.aspx and many other sites like these. The problem that I am having is that when I run the setup on a user machine, the setup runs fine, there are no erros in the logs or event viewer, the registry looks to be fine, the files are copied at the address specified in the installer, the add in appears in Add/Remove programs but it doesn't load when starting Word and is not present in Word as a COM Add In. The SetSecurity project I took it from the VSTO 2005 SE Runtime Sample V3, add it to my solution and insert the output in my setup project. I still believe that it is a trust issue between Office and my add in. The PIA for office is present in assembley and the VSTO seams to be installed corectly. I also created another project that simply shows a MessageBox on startup and shutdown and that installs and works fine on the user machine. Some strange things I noticed are the fact that when I build my project there is no .vsto file created but there is a .vsto.manifest file, I read on a forum that vsto runtime might try to use .net 1.1 instead of 2.0 when both are installed, but i installed a patch to solve that and one more that visual studio 2005 might have some problems and I found and installed a patch for that also, but none of this solved my problems. I have been working and trying all sorts of solutions for the past two weeks but without any result. Have you got any experience with creating setup for office 2003 Add ins? If someone does, please help me!
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不羡慕你 - 我已经有一段时间没有部署 2003 加载项了,我不能说我怀念这些日子。
这本身并不是一个答案,但我注意到您提供的 MSDN 链接指的是 Office 2007;这篇文章专门针对 Office 2003,可能会有用:
http://msdn.microsoft.com/en-us/library/aa537179(office.11).aspx
我记得在使用 Excel 2003 时遇到了一些问题加载项,也许您还会在我的一些旧帖子中找到想法,例如:http://clear-lines.com/blog/post/VSTO-add-in-with-multiple-assemblies.aspx
祝你好运!
I don't envy you - I haven't had to deploy a 2003 add-in in a while, and I can't say I miss these days.
It's not an answer per se, but I noticed that the MSDN link you provide refers to Office 2007; this post, which is specific to Office 2003, may be useful:
http://msdn.microsoft.com/en-us/library/aa537179(office.11).aspx
I remember running into some issues with Excel 2003 add-ins, maybe you'll also find ideas in some of my older posts like this one: http://clear-lines.com/blog/post/VSTO-add-in-with-multiple-assemblies.aspx
Good luck!