Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2017 使用VS2017安装程序项目安装vcredist_x64_Visual Studio 2017_Setup Project_Visual Studio Setup Proje - Fatal编程技术网

Visual studio 2017 使用VS2017安装程序项目安装vcredist_x64

Visual studio 2017 使用VS2017安装程序项目安装vcredist_x64,visual-studio-2017,setup-project,visual-studio-setup-proje,Visual Studio 2017,Setup Project,Visual Studio Setup Proje,我目前想为VS2017项目创建一个安装程序。该项目的先决条件是vcredist_x64 要创建我已安装的安装程序,请执行以下操作: -ClickOnce发布(通过VS2017安装程序) -Microsoft Visual Studio 2017安装程序项目(由Microsoft提供的VS2017插件) 现在我创建了一个安装项目,在Projt=中,我选择了 VisualC++(14)“运行库(X64)< /C>和从组件供应商的网站 如果现在启动created setup.exe,我在目标计算机上安

我目前想为VS2017项目创建一个安装程序。该项目的先决条件是vcredist_x64

要创建我已安装的安装程序,请执行以下操作: -ClickOnce发布(通过VS2017安装程序) -Microsoft Visual Studio 2017安装程序项目(由Microsoft提供的VS2017插件)

现在我创建了一个安装项目,在Projt=中,我选择了 VisualC++(14)“运行库(X64)< /C>和从组件供应商的网站 如果现在启动created setup.exe,我在目标计算机上安装必备软件时会出现错误:
找不到以下软件包:
(未列出任何软件包)。 日志文件:

The following properties have been set: Property: [AdminUser] = true {boolean} Property: [InstallMode] = HomeSite {string} Property: [NTProductType] = 1 {int} Property: [ProcessorArchitecture] = AMD64 {string} Property: [VersionNT] = 10.0.0 {version} Running checks for package 'Visual C++ "14" Runtime Libraries (x64)', phase BuildList Running MsiProductCheck with ProductCode '{C99E2ADC-0347-336E-A603-F1992B09D582}' MsiQueryProductState returned '-1' Setting value '-1 {int}' for property 'VCRedistInstalled' The following properties have been set for package 'Visual C++ "14" Runtime Libraries (x64)': Property: [VCRedistInstalled] = -1 {int} Running checks for command 'vc_redist.x64.exe' Result of running operator 'ValueGreaterThanEqualTo' on property 'VCRedistInstalled' and value '3': false Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'AMD64': false Result of running operator 'VersionLessThan' on property 'VersionNT' and value '6.00': false Result of checks for command 'vc_redist.x64.exe' is 'Install' 'Visual C++ "14" Runtime Libraries (x64)' RunCheck result: Install Needed Installation of components 'Visual C++ "14" Runtime Libraries (x64)' was accepted. Copying files to temporary directory "C:\Users\blubb_user\AppData\Local\Temp\VSD1A14.tmp\" Error: The following package files could not be found: 我现在有

<String Name="VCRedistExe">https://aka.ms/vs/15/release/26429.04/VC_Redist.x64.exe</String>
https://aka.ms/vs/15/release/26429.04/VC_Redist.x64.exe
C:\Program Files(x86)\Microsoft SDK\ClickOnce Bootstrapper\Packages\vcredist\u x64\product.xml我也更改了



<>我不确定关于<代码>产品=“{03EBF69E-68A-6E770-868849F7F9}”< /> >,因为安装有GUID <代码> {5886C72-BBC-BFC87AEBB220C00 }< /Cube >(MsiProductCheck不使用它),所以我从微软Visual C++ 2017 X64最小运行时间(-1414 26429)中取GUID。另一种可能性是使用微软Visual C++ 2017 X64额外运行时-1414 26429(<代码> {B12F584ADE73EE3-8EC4-8A64 DbC0F2A7}<代码>)中的GUID。最小和额外的运行时将与上面的脚本一起安装,因此采用哪种GUID应该无关紧要。

我在x86 redist上遇到了这个问题,最终能够将一切归咎于MS提供的vcredist\u x86\product.xml文件。您应该能够对vcredit\u x64\product.xml文件应用相同的修复程序。 问题是由于文件名和公钥与您从MS下载的实际redist文件不匹配


必须将product.xml的PackageFiles\PackageFile节点和Commands\Command节点中的名称更改为vcredist_x64.exe,并将redist包从MS重命名为vcredist_x64.exe。然后,更改PackageFile节点中的publickey属性,以匹配从MS获得的EXE的公钥。您可以通过使用文件资源管理器查看EXE的SHA1证书来获得该属性(属性->数字签名(SHA1)->详细信息->查看证书->详细信息->公钥)

同样的问题。微软的引导程序文件有一个输入错误。在
C:\ProgramFiles(x86)\Microsoft SDK\ClickOnce Bootstrapper\Packages\vcredist\u x86\product.xml中


vc\u redist.x86.exe
替换
vcredit\u x86.exe
并重新加载Visual Studio。

对于vs2015、vs2017、vs2019:我必须右键单击vc\u redist.x86.exe文件上的属性,然后选择数字签名选项卡,如上所述选择sha256(不是sha1),然后单击Details按钮以获取证书属性窗口,然后单击该窗口上的Details选项卡。然后我不得不向下滚动到公钥。从那里我必须选择并Ctrl+C从下面的ASCII转储窗口复制十六进制公钥文本,因为复制到文件按钮只创建.cer文件。然后我不得不在以管理员模式启动的记事本++中编辑product.xml文件,否则您将无法保存更新后的文件。在将公钥文本粘贴到product.xml文件中之后,我必须选择密钥行,并将所有十六进制数字之间的空格替换为“”。然后我替换了公钥值并最终保存。 2020年,vc_redist.*.exe文件的名称中仍然没有反映版本控制,下载站点在文本中没有显示版本,没有显示公钥,还有人认为这很奇怪吗,因此,要知道它自上次下载以来是否已更新,唯一的方法是将文件大小与上次版本进行比较


更新2020-11-04:如上所述从下载最新的redist并更新product.xml后,在安装带有更新msi的应用程序时,我收到一个错误,指示“找不到以下包文件:vc_runtimeMinimum_x64.msi”。在比较我今天下载的vc_redist exe和我一直使用的那个时,我注意到它更小。看来我要回到旧版本了。

谢谢。MS自己修复了vcredit_x64.exe,但它对我不起作用,因为下载路径被破坏。但找到了一个解决方案(见最初的帖子)。你会认为2018年微软将能够让这项工作至少和1995年一样好。
<String Name="VCRedistExe">https://aka.ms/vs/15/release/26429.04/VC_Redist.x64.exe</String>
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.Visual.C++.14.0.x64">

    <!-- Defines list of files to be copied on build -->
    <PackageFiles CopyAllPackageFiles="false">
        <PackageFile Name="vc_redist.x64.exe" HomeSite="VCRedistExe" PublicKey="3082010a0282010100a829fed410c8ff550a9e990003528fdcb0bff9abf851fe5c8c54c227ce4c2b96ebdb811ccb862b79ca757eb867832686bdd62f1c3ec758aa8f6f95fb5afca7c61bc1c3e84c174e223db75b565c7fd75af52dbabba609bf067cee98fe40f930b86bfe406f74b3b8d63849c9d087072f31dfb6bc4ea3d09eb7627b5670754f67bf05cca3aebe0092c21b50a1613b100001b186d029f340f50fd9a30f57ab6309a8dca96ae74743a7be15c43d27a4e8565288cf5999a10084369bd039d22a0d2fe604e2bf13968883a95137184189e2f9859d8e651a3d0364ccc5de50705df20b85a98fb145e877ff839d09bb72e0e6560895b92b83128931fce758721dbdf983230203010001" />
    </PackageFiles>

    <InstallChecks>
        <MsiProductCheck Property="VCRedistInstalled" Product="{03EBF679-E886-38AD-8E70-28658449F7F9}"/>
    </InstallChecks>

    <!-- Defines how to invoke the setup for the Visual C++ 14.0 redist -->
    <Commands Reboot="Defer">
        <Command PackageFile="vc_redist.x64.exe" Arguments=' /q '>

            <!-- These checks determine whether the package is to be installed -->
            <InstallConditions>
                <BypassIf Property="VCRedistInstalled" Compare="ValueGreaterThanOrEqualTo" Value="3"/>
                <!-- Block install if user does not have admin privileges -->
                <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
                <!-- Block install on any platform other than x64 -->
                <FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" String="InvalidOS"/>
                <!-- Block install on Vista or below -->
                <FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.00" String="InvalidPlatformWinNT"/>
            </InstallConditions>

            <ExitCodes>
                <ExitCode Value="0" Result="Success"/>
                <ExitCode Value="3010" Result="SuccessReboot"/>
                <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
            </ExitCodes>

        </Command>
    </Commands>
</Product>