簡體   English   中英

Visual Studio 中未加載先決條件

[英]Prerequisites not load in Visual Studio

我正在制作一個安裝程序,除了進行開發之外,還需要自動安裝“Microsoft Access 數據庫引擎 2010”(MADE2010),這是由於數據庫連接。 我遇到的問題是我的計算機已格式化,當我想再次加載項目時,它在 MADE2010 先決條件中顯示為未啟用的警告,我刪除了選擇,再次加載 MADE2010 XML 和安裝程序,現在我可以了t 讓它們重新加載到先決條件列表中。 我已經上傳了文件夾

* C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages*

在其中加載“product.xml”文件,“AccessDatabaseEngine.exe”安裝程序(因為我只需要 x86)並創建一個名為“en”的文件夾,其中包含兩個文件,一個名為“license.txt”和“package . xml”,但未加載 Visual Studio (2017) 先決條件中的 MADE2010。

如果我犯了錯誤,你能指導我嗎?

這是“package.xml”文件:

 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <Product  
  xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"  
  ProductCode="Access.Database.Engine.2010"  
 >  
  <!-- Defines list of files to be copied on build -->  
  <PackageFiles CopyAllPackageFiles="false">  
   <PackageFile Name="AccessDatabaseEngine.exe" HomeSite="http://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine.exe" />   
  </PackageFiles>  
  <RelatedProducts>  
   <DependsOnProduct Code="Microsoft.Net.Framework.2.0" />  
  </RelatedProducts>  
  <InstallChecks>  
       <MsiProductCheck Property="IsInstalled"   
         Product="{90140000-00D1-0409-0000-0000000FF1CE}"/>  
  </InstallChecks>  
  <Commands>  
   <Command PackageFile="AccessDatabaseEngine.exe"  
      Arguments='/passive'>  
    <!-- These checks determine whether the package is to be installed -->  
    <InstallConditions>  
     <!-- ByPass if the Processor is not x86 -->  
     <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>  
   <!-- ByPass if we have installed -->  
     <BypassIf Property="IsInstalled" Compare="ValueGreaterThan" Value="0" />  
     <!-- 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="1641" Result="SuccessReboot"/>  
     <ExitCode Value="3010" Result="SuccessReboot"/>  
     <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />  
    </ExitCodes>  
   </Command>  
  </Commands>  
 </Product>  

這是“product.xml”文件:

 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <Product  
  xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"  
  ProductCode="Access.Database.Engine.2010"  
 >  
  <!-- Defines list of files to be copied on build -->  
  <PackageFiles CopyAllPackageFiles="false">  
   <PackageFile Name="AccessDatabaseEngine.exe" HomeSite="http://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine.exe" />   
  </PackageFiles>  
  <RelatedProducts>  
   <DependsOnProduct Code="Microsoft.Net.Framework.2.0" />  
  </RelatedProducts>  
  <InstallChecks>  
       <MsiProductCheck Property="IsInstalled"   
         Product="{90140000-00D1-0409-0000-0000000FF1CE}"/>  
  </InstallChecks>  
  <Commands>  
   <Command PackageFile="AccessDatabaseEngine.exe"  
      Arguments='/passive'>  
    <!-- These checks determine whether the package is to be installed -->  
    <InstallConditions>  
     <!-- ByPass if the Processor is not x86 -->  
     <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>  
   <!-- ByPass if we have installed -->  
     <BypassIf Property="IsInstalled" Compare="ValueGreaterThan" Value="0" />  
     <!-- 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="1641" Result="SuccessReboot"/>  
     <ExitCode Value="3010" Result="SuccessReboot"/>  
     <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />  
    </ExitCodes>  
   </Command>  
  </Commands>  
 </Product>  

我發現了錯誤。

在制作整個包(包、產品、許可證、語言和可執行文件)時,必須在 SDKs 文件夾之外進行(在您的桌面上參考) ,因為如果在內部進行,無論您配置多少前提條件的更改都會反映。 除此之外,在部署屬性中,在:

屬性 > 雜項 > 本地化

確保選擇您需要的語言。 就我而言,我使用的是英語(美國),因此您選擇“英語(美國)”,在您的文件夾中,您必須創建一個名為“en”的文件夾,其中包含“package.xml 和 license.txt”文件或 EULA。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM