在Visual Studio 2015中,我检查了vsto加载项的先决条件,然后创建setup.exe。然后,第一次执行setup.exe文件时,由于缺少更好的词,看来某些先决条件被“跳过”了。
这可以通过查看在%temp%文件夹下创建的installation.log文件来证明(准确地说,该文件是在实际在%temp%下创建的父文件夹下创建的)。以下是该文件的内容。您可以看到该软件包,例如,在文件夹C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ SDK \ Bootstrapper \ Packages \ DotNetFX40Client下,确实有一个条目,而没有提及其他两个软件包包括在安装文件的创建中。这些是VST40(对应于C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ SDK \ Bootstrapper \ Packages \ VST40)和vcredist_x64(对应于C:\ Program Files( x86)\ Microsoft Visual Studio 14.0 \ SDK \ Bootstrapper \ Packages \ vcredist_x64)。这两个软件包负责安装“用于Office Runtime(x86和x64)的Microsoft Visual Studio 2010工具”和“ Visual C ++ 2010 Runtime库(x64)”,如果VSTO添加,则需要在具有Excel 64位计算机的计算机上安装它们。可以在这样的机器上成功安装。
有人知道为什么第一次安装外接程序(这是一次clickonce安装)时setup.exe似乎没有报告成功或失败或其他任何信息。 ?我一直在努力解决这个问题,因为有大约80个用户需要在其计算机上部署外接程序,并且其中一些用户具有Excel 64位应用程序,这些应用程序是必须具备这些先决条件的。在Excel 32位计算机上,部署可以正常进行。
我必须指出,VST40软件包是Visual Studio 2015安装随附的Visual Studio内置软件包。 vcredist_x64是我手动创建的,并且确实显示在前提屏幕上。
%temp%下的installtion.log文件
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.2.0 {version}
Running checks for package 'Windows Installer 3.1', phase BuildList
The following properties have been set for package 'Windows Installer 3.1':
Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true
Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'
'Windows Installer 3.1' RunCheck result: No Install Needed
Running checks for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)', phase BuildList
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client'
Read string value '4.7.02556'
Setting value '4.7.02556 {string}' for property 'DotNet40Client_TargetVersion'
The following properties have been set for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)':
Property: [DotNet40Client_TargetVersion] = 4.7.02556 {string}
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe' is 'Bypass'
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Client_TargetVersion' and value '4.0.30129': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe' is 'Bypass'
'Microsoft .NET Framework 4 Client Profile (x86 and x64)' RunCheck result: No Install Needed
Launching Application.
Application appears to be a VSTO manifest
Installing VSTO solution via vstoee