VSTO从Vs2010升级到Vs2017 - 已发布的应用程序需要下载 [英] VSTO upgrade from Vs2010 to Vs2017 - Published app requires download

查看:92
本文介绍了VSTO从Vs2010升级到Vs2017 - 已发布的应用程序需要下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将Word AddIn从Vs2010升级到Vs2017,允许使用Sha256签名证书

Upgrade Word AddIn from Vs2010 to Vs2017 performed to allow usage of Sha256 Signing Certificate

升级后,已发布的应用程序(ClickOnce)想要安装'Microsoft Visual Studio 2010工具Office运行时(x86和x64)'

使用Vs2010发布时不需要这样做。

After upgrade, published app (ClickOnce) wants to install 'Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64)'
This was not needed when published with Vs2010.

此Word-AddIn应用程序由数百名用户提供。

所有桌面都设置在用户没有管理员权限的位置,因此他们无法执行此安装。

This Word-AddIn application is by several hundred users.
All desktops are setup where the user does not have admin privileges, so they cannot perform this install.

安装了Office 2010的Windows 7

Windows 7 with Office 2010 installed

以下是我的升级步骤:

1。使用Vs2017加载解决方案 - 没有错误

2.将应用程序 - >'.NET Framework 4客户端配置文件'的目标框架更改为'.NET Framework 4.6.1'为
    项目已根据需要关闭并重新开启 - 无错误

3.建设项目 - 2警告:

*********** ************************************************** *****************

  警告 - > BC40059->为嵌入式互操作程序集创建了一个引用


   'Microsoft.Office.Tools.Common,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'


  因为从装配中间接引用该装配件而是
   'Microsoft.Office.Tools.Word,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'。


  考虑更改任一组件上的"嵌入互操作类型"属性。

***************************** **************

  警告 - > BC40059->为嵌入式互操作程序集创建了一个引用


   'Microsoft.Office.Tools,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'


  因为从装配中间接引用该装配件而是
   'Microsoft.Office.Tools.Word,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'。


  考虑更改任一组件上的"嵌入互操作类型"属性。

***************************** **************

4.在参考文献中, 

    将属性'嵌入互操作类型'从'True'更改为'False',用于:

      'Microsoft.Office.Tools.Common'和'Microsoft.Office.Tools'

5.构建项目 - 没有错误

6.发布 - >发布现在 - 没有错误

7.从已发布的位置运行setup.exe。

   它想安装'用于Office运行时的Microsoft Visual Studio 2010工具(x86和x64)'

1. Load solution using Vs2017 - No Errors
2. Change Application->Target framework for '.NET Framework 4 Client Profile' to '.NET Framework 4.6.1'
    Project closed and re-opened as required - No Errors
3. Build project - 2 Warnings:
******************************************************************************
   Warning->BC40059->A reference was created to embedded interop assembly
   'Microsoft.Office.Tools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   because of an indirect reference to that assembly from assembly
   'Microsoft.Office.Tools.Word, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   Consider changing the 'Embed Interop Types' property on either assembly.
******************************************************************************
   Warning->BC40059->A reference was created to embedded interop assembly
   'Microsoft.Office.Tools, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   because of an indirect reference to that assembly from assembly
   'Microsoft.Office.Tools.Word, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   Consider changing the 'Embed Interop Types' property on either assembly.
******************************************************************************
4. In References, 
    Change property 'Embed Interop Types' from 'True' to 'False' for:
      'Microsoft.Office.Tools.Common' and 'Microsoft.Office.Tools'
5. Build project - No Errors
6. Publish->Publish Now - No Errors
7. Ran setup.exe from published location.
    It wants to install 'Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64)'

Tim

推荐答案

Hello Tim,

Hello Tim,

必须在每个上安装用于Office运行时的Visual Studio 2010工具运行使用Visual Studio中的Microsoft Office开发人员工具创建的解决方案的计算机。

The Visual Studio 2010 Tools for Office Runtime must be installed on each computer that runs solutions that are created by using the Microsoft Office developer tools in Visual Studio.

请先使用管理员帐户安装Office Runtime的Visual Studio 2010工具,然后使用非管理员帐户安装加载项。您可以从
https://www.microsoft.com/en下载它-us / download / details.aspx?id = 48217

Please use admin account to install Visual Studio 2010 Tools for Office Runtime firstly and then use non-admin account to install your add-in. You could download it from https://www.microsoft.com/en-us/download/details.aspx?id=48217

此外,我建议您使用Windows安装程序进行部署,因为您的加载项将用于所有用户。  请访问
使用Windows Installer部署Office解决方案

Besides, I would suggest you deploy it using windows installer as your add-in would be used for all users. Please visit Deploying an Office Solution by Using Windows Installer

问候,

Celeste

Celeste


这篇关于VSTO从Vs2010升级到Vs2017 - 已发布的应用程序需要下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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