c# - Visual Studio 先决条件下载失败,HRESULT=-2146697208

标签 c# visual-studio installation clickonce

我们有一个单击一次的安装程序,我们在其中添加了 .NET 框架和 SQL localDB 2014 作为先决条件。我们已经给出了“从以下许可证下载先决条件”的选项,如下图所示。

enter image description here

这在除 Windows 2012 以外的所有操作系统中都运行良好。当我们尝试在 2012 年安装时,出现“下载失败,HRESULT=-2146697208”错误。以下是来自 install.log 的完整日志

The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = SpecificSite {string}
Property: [NTProductType] = 3 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.2.0 {version}
Running checks for package 'Microsoft .NET Framework 4.5 (x86 and x64)', phase BuildList
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
Read string value '4.5.50709'
Setting value '4.5.50709 {string}' for property 'DotNet45Full_TargetVersion'
The following properties have been set for package 'Microsoft .NET Framework 4.5 (x86 and x64)':
Property: [DotNet45Full_TargetVersion] = 4.5.50709 {string}
Running checks for command 'DotNetFX45\dotNetFx45_Full_x86_x64.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet45Full_TargetVersion' and value '4.5.50709': true
Result of checks for command 'DotNetFX45\dotNetFx45_Full_x86_x64.exe' is 'Bypass'
Running checks for command 'DotNetFX45\dotNetFx45_Full_setup.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX45\dotNetFx45_Full_setup.exe' is 'Bypass'
'Microsoft .NET Framework 4.5 (x86 and x64)' RunCheck result: No Install Needed
Running checks for package 'SQL Server 2014 SP1 Express LocalDB', phase BuildList
Looking up path for special folder 'ProgramFilesFolder'
Running check with folder 'C:\Program Files (x86)\Microsoft SQL Server\120\LocalDB\Binn' and file 'sqlservr.exe'
Unable to find directory 'C:\Program Files (x86)\Microsoft SQL Server\120\LocalDB\Binn'
Not setting value for property 'sqllocaldbVersion'
Looking up path for special folder 'WindowsVolume'
Running check with folder 'C:\Program Files\Microsoft SQL Server\120\LocalDB\Binn' and file 'sqlservr.exe'
Unable to find directory 'C:\Program Files\Microsoft SQL Server\120\LocalDB\Binn'
Not setting value for property 'sqllocaldbVersion_x64'
The following properties have been set for package 'SQL Server 2014 SP1 Express LocalDB':
Running checks for command 'SqlLocalDB2014SP1\sqllocaldb_x86.msi'
Result of running operator 'ValueNotExists' on property 'VersionNT': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '6.0.1': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': true
Result of checks for command 'SqlLocalDB2014SP1\sqllocaldb_x86.msi' is 'Bypass'
Running checks for command 'SqlLocalDB2014SP1\sqllocaldb_x64.msi'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
Skipping ByPassIf because Property 'sqllocaldbVersion' was not defined
Skipping ByPassIf because Property 'sqllocaldbVersion_x64' was not defined
Result of checks for command 'SqlLocalDB2014SP1\sqllocaldb_x64.msi' is 'Install'
'SQL Server 2014 SP1 Express LocalDB' RunCheck result: Install Needed
EULA for components 'SQL Server 2014 SP1 Express LocalDB' was accepted.
Copying files to temporary directory "C:\Users\ADMINI~1\AppData\Local\Temp\2\VSD8390.tmp\"
Downloading files to "C:\Users\ADMINI~1\AppData\Local\Temp\2\VSD8390.tmp\"
(5/17/2017 8:47:57 AM) Downloading 'SqlLocalDB2014SP1\sqllocaldb_x64.msi' from 'https://*********/printconnector/prerequisites/SqlLocalDB2014SP1/sqllocaldb_x64.msi' to 'C:\Users\ADMINI~1\AppData\Local\Temp\2\VSD8390.tmp\'
Download completed at 5/17/2017 8:48:04 AM
Downloading failed with HRESULT=-2146697208

这仅在 Windows 2012 服务器上失败的原因是什么,是否可以解决此问题? (没有提供从组件供应商的网站下载先决条件的选项)

最佳答案

问题似乎出在 2012 年的 ssl 上,因为使用 http 而不是 https 下载成功。

关于c# - Visual Studio 先决条件下载失败,HRESULT=-2146697208,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44015329/

相关文章:

c# - 我怎样才能弄清楚刚刚运行的代码是什么?

c# - 学习 C# 和 .NET 的书籍

java - 在 Mac OSX 上运行 Java 7 EE SDK 的 .sh 安装程序需要什么显示设置

c# - 从 C# 执行 SSIS 包

c# - NHibernate 自定义连接字符串配置

c# - 如何将程序集信息添加到由 dot net core 2.0 生成的 PrecompiledViews dll

c# - 如何修复在同一存储帐户内将数据从 blob 发送到文件共享的问题?

c++ - GCC 5.2.1 上的 EOF 与 basic_ios::eof()

python - 不能用pip安装elementtree

c# - 可再发行的.net框架安装程序