ClickOnce 单个解决方案部署与多个解决方案部署
我一直在尝试为 VSTO Word 解决方案创建部署。我有两个项目:一个加载项和一个模板。我选择 ClickOnce,因为稍后将实现自动更新。
我为加载项和模板创建了单独的 ClickOnce 安装程序。但其缺点是加载项必须知道模板将安装在哪里,因为这两个项目将紧密协作。我查阅了 MSDN,看到了在单个 ClickOnce 部署中部署多个办公解决方案的文章。请参阅下面的链接:
http://msdn.microsoft.com/en-us/库/dd465290.aspx
我按照步骤进行操作并测试安装。这两个项目安装在一个位置,但模板不存在。我修改了安装程序项目以包含模板,现在它被复制到安装时的目录中。当我通过加载项中的代码打开模板时,它会生成错误并表示找不到模板的 VSTO。我检查了安装文件夹,那里没有 VSTO。
我尝试将模板项目作为独立的项目发布。安装正常,当我打开模板时,它能够从使用的 ClickOnce 安装文件夹中正确加载 VSTO。
我很困惑我做错了什么。同时,将两个 Office 项目放在一个 ClickOnce 部署下时,我应该知道是否还有其他差异,特别是模板类型项目。我在某处读到 ClickOnce 与模板项目类型不太匹配。
I've been trying to create deployment for a VSTO Word solution. I have two projects: an add-in and a template. I opt for ClickOnce as auto-updates will be implemented later on.
I created separate ClickOnce installers for both the add-in and template. But the drawback with that one is the add-in must know where the template will be installed since the two projects will be working together closely. I looked around MSDN and saw the article in deploying multiple office solutions in a single ClickOnce deployment. See below for links:
http://msdn.microsoft.com/en-us/library/dd465290.aspx
I followed through the steps and tested the installation. The two projects are installed under one location but the template is not there. I modified the installer project to include the template and now it is being copied to the directory upon installation. When I open the template through code from the add-in, it produces an error and says it cannot find the VSTO of the template. I checked the installation folder and there are no VSTOs there.
I tried publishing the Template project as a stand-alone. The installation is okay and when I open the template, it is able to load the VSTO properly from the installation folder ClickOnce used.
I'm confused as to what I'm doing wrong. At the same time, is there any other difference I should know when putting two Office projects under one ClickOnce deployment, particularly Template type projects. I've read somewhere that ClickOnce does not go well with Template project types.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论