【问题标题】:Error while installing VSTO file - A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)安装 VSTO 文件时出错 - 连接到系统的设备无法运行。 (来自 HRESULT 的异常:0x8007001F)
【发布时间】:2017-02-23 15:23:30
【问题描述】:

当我尝试在机器 1 上为用户 a 安装我们的 VSTO(outlook)文件时,它工作正常,但对于用户 b,它给出了以下异常。

Log Name:      Application
Source:        VSTO 4.0
Date:          03/10/2016 12:50:59
Event ID:      4096
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      NAME_OF_COMPUTER
Description:
Customization URI: file:///C:/Program Files (x86)/MAIN_FOLDER/SUB_FOLDER/OUTLOOK PLUGIN.vsto
Exception: A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)


************** Exception Text **************
System.Runtime.InteropServices.COMException (0x8007001F): A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1026 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Runtime
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.60724.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.233 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1026 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1032 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1036 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Hosting
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.60724.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.ServerDocument
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.60724.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1026 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.60724.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
System.Deployment
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1039 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1015 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Security
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1031 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------



Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="VSTO 4.0" />
    <EventID Qualifiers="49154">4096</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2016-10-03T11:50:59.000000000Z" />
    <EventRecordID>1179761</EventRecordID>
    <Channel>Application</Channel>
    <Computer>COMPUTER_NAME</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Customization URI: file:///C:/Program Files (x86)/MAIN_FOLDER/SUB_FOLDER/OUTLOOK PLUGIN.vsto
Exception: A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)


************** Exception Text **************
System.Runtime.InteropServices.COMException (0x8007001F): A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

有什么想法吗?

More information on query

环境:- 远程桌面服务服务器 2008 R2

【问题讨论】:

    标签: c# vsto clickonce office-interop outlook-addin


    【解决方案1】:

    我们刚刚解决了这个问题。我们发现用户 a 的个人资料很狡猾。我们删除了特定的配置文件并创建了一个新配置文件,它运行良好!

    我们仍在查明个人资料的“不可靠”之处。

    感谢您的帮助。

    【讨论】:

      【解决方案2】:

      检查是否存在阻止 ClickOnce 安装的只读文件。该错误通常与设备无关,而只是由安装程序阻塞导致无法使用 ClickOnce 引擎删除/覆盖文件。

      可能需要手动正确清除阻塞 ClickOnce 引擎的先前安装(也可能清除 ClickOnce 缓存)。

      【讨论】:

      • 嗨 Maarten,我已经检查了所有必需的权限,这不是问题。我也尝试清除缓存,但没有成功。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-14
      • 1970-01-01
      • 1970-01-01
      • 2021-08-15
      • 1970-01-01
      • 2023-03-17
      • 2017-02-17
      相关资源
      最近更新 更多