Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/16.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 2012 缺少Visual C+的先决条件+;在Visual Studio 2012中_Visual Studio 2012_Clickonce_Prerequisites_Visual C++ 2012 - Fatal编程技术网

Visual studio 2012 缺少Visual C+的先决条件+;在Visual Studio 2012中

Visual studio 2012 缺少Visual C+的先决条件+;在Visual Studio 2012中,visual-studio-2012,clickonce,prerequisites,visual-c++-2012,Visual Studio 2012,Clickonce,Prerequisites,Visual C++ 2012,我最近安装了vs2012,并更新了ClickOnce应用程序。更准确地说,我第一次打开我的C++项目(这取决于我的主要C#项目)时,我没有更新它,而且一切正常 VS 2012 仍然能够看到Visual C++ 2010的前提条件。稍后,我更新了我的项目,将平台工具集更改为属性->配置属性->常规下的Visual Studio 2012(v110) P>同时我还安装了其他的代码>软件,现在我发现我不能再为CLIKONE发布添加VisualC++的前提条件了。 VisualC++ 2010运行库(

我最近安装了
vs2012
,并更新了ClickOnce应用程序。更准确地说,我第一次打开我的
C++项目
(这取决于我的主要C#项目)时,我没有更新它,而且一切正常<代码> VS 2012 仍然能够看到Visual C++ 2010的前提条件。稍后,我更新了我的项目,将平台工具集更改为
属性->配置属性->常规下的
Visual Studio 2012(v110)

<> P>同时我还安装了其他的<>代码>软件<代码>,现在我发现我不能再为CLIKONE发布添加VisualC++的前提条件了。 VisualC++ 2010运行库(X64) Visual C++ 2012运行库X64(和x86),但是即使这个前提也不存在。 我猜这是因为在文件夹
C:\ProgramFiles(x86)\Microsoft SDK\Windows\v8.0A\Bootstrapper\Packages
中,相应的包
(vcredit\u x64)
是空的。我还注意到,在控制面板中安装的程序列表中,我安装了<代码>微软Visual C++ 2010 X64 < /C>和 x86 < /Cudi>,其中包括可重新分发的版本和运行时版本(我想它们以前安装了VisualStudio 2010),而我却丢失了Visual C++ 2012文件。因此我认为Visual C++ 2012没有和Visual Studio 2012一起出现,不是吗?我甚至试着通过下载来安装这些软件包,现在它们在我安装的程序中列出(只有可再发行版本,而不是运行时版本)


然而,前提条件仍然缺失。我怎样才能解决这个问题?我甚至想过手动复制VisualC++ 2010中的BooTraspFor包,它位于……代码> V7.0A\BooTrasper-\Prase< /Cord>文件夹中,并手动更改C++ 2012,但不知道我应该在<代码>产品> XML >代码> > <代码> <代码>下编写。似乎可以通过Bootstrapper Manager获得插入此信息的产品GUID,但此程序引发了许多异常,我不知道如何执行。作为第二种解决方案,简单地复制VisualC++ 2010的包是否可以从>\V7.0A\BooTrasper-\Spabs\BooTrasper-\Posits到\V80A\BooTrasper-\Prase

< P> >到\v80a\BooTrasper-\PACK,并确保您有VCCRistOxx86'文件夹。

在该文件夹中,您应该有一个“en”文件夹,该文件夹应保留在那里,您将丢失该文件夹

  • product.xml
  • vcredit_x86.exe
  • 您可以从下载所需的.exe

    至于product.xml

    <?xml version="1.0" encoding="utf-8" ?> 
    
        <Product
          xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
          ProductCode="Microsoft.Visual.C++.11.0.x86"
        >
    
          <!-- Defines list of files to be copied on build -->
          <PackageFiles>
            <PackageFile Name="vcredist_x86.exe" HomeSite="VCRedistExe"/>
          </PackageFiles>
          <InstallChecks>
            <MsiProductCheck Property="VCRedistInstalled" Product="{6C772996-BFF3-3C8C-860B-B3D48FF05D65}"/>
          </InstallChecks>
    
          <!-- Defines how to invoke the setup for the Visual C++ 11.0 redist -->
          <!-- TODO: Needs EstrimatedTempSpace, LogFile, and an update of EstimatedDiskSpace -->
          <Commands Reboot="Defer">
            <Command PackageFile="vcredist_x86.exe" 
                 Arguments=' /q:a ' 
                 >
    
              <!-- 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 Win95 -->
                <FailIf Property="Version9X" Compare="VersionLessThan" Value="4.10" String="InvalidPlatformWin9x"/>
    
                <!-- Block install on NT 4 or less -->
                <FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.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>
    

    对于那些正在为2012 x64 vCredit寻找类似答案的人,这里是我拼凑的一个似乎有效的答案。注意下载链接是

    
    
    谢谢,vcredist_x64.exe怎么样?Noam的回答是正确的,只是msbuild不喜欢“xml版本…”行的两个副本。我删除了一个,可以在脚本上运行msbuild来生成安装文件。
    <?xml version="1.0" encoding="utf-8" ?> 
    
    <Product
      xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
      ProductCode="Microsoft.Visual.C++.11.0.x64"
    >
    
      <!-- Defines list of files to be copied on build -->
      <PackageFiles>
        <PackageFile Name="vcredist_x64.exe" HomeSite="VCRedistExe"/>
      </PackageFiles>
      <InstallChecks>
        <MsiProductCheck Property="VCRedistInstalled" Product="{CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}"/>
      </InstallChecks>
    
      <!-- Defines how to invoke the setup for the Visual C++ 11.0 redist -->
      <!-- TODO: Needs EstimatedTempSpace, LogFile, and an update of EstimatedDiskSpace -->
      <Commands Reboot="Defer">
        <Command PackageFile="vcredist_x64.exe" 
             Arguments=' /q:a ' 
             >
    
          <!-- 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" Value="AMD64" Compare="ValueNotEqualTo" 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>