6

Tôi vừa cài đặt vs2012 và tôi đã cập nhật ứng dụng ClickOnce của mình. Để chính xác hơn, lần đầu tiên tôi mở C++ project (tùy thuộc vào dự án C# chính của tôi) Tôi đã không cập nhật nó và mọi thứ hoạt động tốt. VS 2012 vẫn có thể xem điều kiện tiên quyết Visual C++ 2010. Sau đó tôi đã cập nhật dự án của mình bằng cách thay đổi Platform Toolset thành "Visual Studio 2012 (v110)" trong Properties->Configuration Properties->General.Thiếu điều kiện tiên quyết cho Visual C++ trong Visual Studio 2012

Trong khi chờ đợi, tôi đã cài đặt ngay cả software và bây giờ tôi phát hiện ra rằng tôi không thể thêm điều kiện tiên quyết Visual C++ vào dự án của tôi để xuất bản ClickOnce. Các điều kiện tiên quyết Visual C++ 2010 Runtime Libraries (x64) được đánh dấu bằng một hình tam giác màu vàng và nó là mất tích. Lý tưởng nhất là tôi muốn cập nhật thành Visual C++ 2012 Runtime Libraries x64 (and x86), nhưng ngay cả điều kiện tiên quyết này cũng bị thiếu.

Tôi đoán đó là do thực tế rằng trong thư mục C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages gói tương ứng (vcredist_x64) trống. Tôi cũng nhận thấy rằng trong danh sách các chương trình đã cài đặt trong Control Panel, tôi đã cài đặt Microsoft Visual C++ 2010 x64x86, cả phiên bản Redistributable và phiên bản Thời gian chạy (tôi nghĩ chúng đã được cài đặt trước đó với Visual Studio 2010). Tệp C++ 2012. Do đó tôi đang tranh luận rằng Visual C++ 2012 đã không đến với nhau với Visual Studio 2012, phải không? Tôi thậm chí đã cố gắng để cài đặt các gói Visual C++ 2012 Redistributable x64 bằng cách tải xuống chúng và bây giờ chúng được liệt kê trong các chương trình đã cài đặt của tôi 8only the Redistributable, chứ không phải phiên bản Runtime).

Tuy nhiên, điều kiện tiên quyết vẫn còn thiếu. Làm sao tôi có thể giải quyết việc này? Tôi thậm chí còn nghĩ về việc sao chép thủ công gói bootstrapper cho Visual C++ 2010 nằm trong thư mục ... \v7.0A\Bootstrapper\Packages và thay đổi nó theo cách thủ công cho C++ 2012 nhưng tôi không biết mình nên viết gì trong product.xml theo <MsiProductCheck Property="VCRedistInstalled" Product=?>. Có vẻ như sản phẩm GUID để chèn thông tin này có thể được lấy bằng Bootstrapper Manager, nhưng chương trình này đang ném rất nhiều ngoại lệ và tôi không biết làm thế nào để làm điều đó. Như một giải pháp thứ hai là nó an toàn để chỉ đơn giản là sao chép các gói cho Visual C++ 2010 từ \\v7.0A\Bootstrapper\Packages\Bootstrapper\Packages to \v8.0A\Bootstrapper\Packages?

Trả lời

3

Đi tới \ v8.0A \ Bootstrapper \ Gói và đảm bảo bạn có thư mục vcredist_x86.

Trong thư mục mà bạn cần phải có một "en" thư mục, mà nên vẫn còn ở đó, bạn đang thiếu

  1. product.xml
  2. vcredist_x86.exe

Bạn có thể tải cần thiết .exe từ http://go.microsoft.com/fwlink/?LinkID=266495&clcid=0x409

Đối với 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> 
+0

Cảm ơn, làm thế nào về vcredist_x64.exe? – Berezh

+0

Câu trả lời của Noam là chính xác, ngoại trừ việc msbuild không thích hai bản sao của dòng "xml version ...". Tôi đã xóa một và tôi có thể chạy msbuild trên tập lệnh để tạo tệp thiết lập. –

1

Đối với những người đang tìm kiếm câu trả lời tương tự cho vcredist năm x64 năm 2012, đây là một trong những câu hỏi mà tôi đã kết hợp với nhau có vẻ như hoạt động. Lưu ý liên kết tải xuống là http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe

<?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> 
Các vấn đề liên quan