如何将QBFC13_0.msm添加到Clickonce [英] How to add QBFC13_0.msm to Clickonce

查看:104
本文介绍了如何将QBFC13_0.msm添加到Clickonce的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网络上似乎没有关于如何执行此操作的逐步记录.如果提到它,那么它的文献记录很少,我无法遵循他们建议的复杂路径. 我是ClickOnce的新手,我已经能够将c#程序正确安装在用户计算机上,但是当然我得到了"22E88GD7-FB0B-B905-CCA6BD526B52"未注册的类",这意味着我相信用户计算机上未安装QBFC13.我的客户不希望在ClickOnce之外使用标准QB安装程序单独安装QBFC,而是希望将其作为ClickOnce的一部分.真的是那么复杂且记录不充分的过程吗?我见过的所有google搜索和stackoverflow条目都没有提供一种轻松或完全做到这一点的方法,以便新手可以做到.救命!

解决方案

在VS2012中,您需要添加先决条件(项目属性->发布->先决条件...)./p>

但是,默认情况下,QBFC不在列表中,因此需要 Microsoft的Bootstrapper清单生成器来创建自己的.不幸的是,这是越野车和令人困惑的事情.所以,这就是你的做法:

  1. 新项目-选择打包清单"
  2. 项目名称-此清单项目的保存"名称在此处"
  3. 在树中,依次单击软件包",然后单击添加安装文件"-浏览到.msi或.exe

    ex: C:\Users\{username}\AppData\Local\Downloaded Installations\{C7896CDC-45FF-49E1-A23D-68FA13A910A5}\QBFC 11.0.msi
    

  4. 显示名称-将在Visual Studio中显示的名称"

    ex: QuickBooks Foundation Classes v11.0
    

  5. 属性"标签-不需要,跳过
  6. 系统检查-单击第一个图标文件检查"

    1. 结果属性-您要测试的步骤3中的文件属性

      ex: Name
      

    2. 要搜索的文件名-与第3步选择相同的文件
    3. 在特殊文件夹中开始搜索-将其与步骤#6.2匹配

      ex: AppDataFolder
      

    4. 路径-将其与步骤#6.2

      匹配

      ex: \Local\Downloaded Installations\{C7896CDC-45FF-49E1-A23D-68FA13A910A5}
      

  7. 安装条件"选项卡

    1. 类型-ByPassIf
    2. 属性-从步骤#6.1中选择标识符
    3. 比较-存在
    4. 值-不适用

  8. 退出代码"标签

    1. 退出码-0
    2. 结果-成功

  9. 保存您的工作,然后构建"(CTRL + SHIFT + B)
  10. 构建结果"对话框-单击构建输出"链接
  11. 将整个文件夹移动/复制到:

    [VS2012] C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\
    

  12. 重新启动Visual Studio,新的必备组件将出现在列表中!
  13. 现在,只需在项目属性"->发布"->先决条件..."下选择它,然后发布

这是我为QBFCv11生成的有效"product.xml":

<?xml version="1.0" encoding="utf-8"?>
<Product ProductCode="Intuit.QBFCv11" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="qbfc 11.0.msi" PublicKey="3082...0001" />
  </PackageFiles>
  <InstallChecks>
    <FileCheck Property="Name" SpecialFolder="ProgramFilesFolder" SearchPath="Local\Downloaded Installations\{C7896CDC-45FF-49E1-A23D-68FA13A910A5}" FileName="QBFC 11.0.msi" />
  </InstallChecks>
  <Commands Reboot="Defer">
    <Command PackageFile="qbfc 11.0.msi">
      <InstallConditions>
        <BypassIf Property="Name" Compare="ValueExists" Value="N/A for ValueExists and ValueNotExists" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
      </ExitCodes>
    </Command>
  </Commands>
</Product>

There seems to be no step by step process documented anywhere on the web on how to do this. If it is mentioned, it's very poorly documented, and I cannot follow the complex path they suggest. I am a newbie to ClickOnce, I've been able to get my c# program to install correctly on the users machine, but of course I get the "22E88GD7-FB0B-B905-CCA6BD526B52" "class not registered", implying I believe that QBFC13 is not installed on the users machine. My customer does NOT want a separate one time installation of QBFC using the standard QB installer outside of ClickOnce, he wants it as part of ClickOnce. Is it really that complex and a poorly documented process? All of the google searches and stackoverflow entries that I've seen don't give a way to do it easily or completely so that a newbie can do it. Help!

解决方案

In VS2012, you need to add a Prerequisite (Project Properties --> Publish --> Prerequisites...).

However, QBFC is not in the list by default, so Microsoft's Bootstrapper Manifest Generator is needed to create your own. Unfortunately, it is buggy and confusing. So here's how you do:

  1. New Project - select "Package Manifest"
  2. Project Name - "The 'save' name of this manifest project goes here"
  3. In the tree, alt-click "Package", then "Add Install File" - browse to the .msi or .exe

    ex: C:\Users\{username}\AppData\Local\Downloaded Installations\{C7896CDC-45FF-49E1-A23D-68FA13A910A5}\QBFC 11.0.msi
    

  4. Display Name - "The name that will show up in Visual Studio"

    ex: QuickBooks Foundation Classes v11.0
    

  5. Properties tab - not needed, skip
  6. System Checks - click the first icon "File Check"

    1. Property for Result - The file property from Step #3 that you'd like to test

      ex: Name
      

    2. File name to search for - pick the same file as in Step #3
    3. Start Search in Special Folder - match this to Step #6.2

      ex: AppDataFolder
      

    4. Path - match this to Step #6.2

      ex: \Local\Downloaded Installations\{C7896CDC-45FF-49E1-A23D-68FA13A910A5}
      

  7. Install Conditions tab

    1. Type - ByPassIf
    2. Property - select the identifier from Step #6.1
    3. Comparison - Exists
    4. Value - N/A

  8. Exit Codes tab

    1. Exit Code - 0
    2. Result - Success

  9. Save your work, then "Build" (CTRL+SHIFT+B)
  10. Build Results dialog - click the "Build Output" link
  11. Move/Copy this entire folder to:

    [VS2012] C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\
    

  12. Restart Visual Studio and your new Prerequisite will be in the list!
  13. Now, just select it under Project Properties --> Publish --> Prerequisites... and Publish

Here's the working "product.xml" I generated for QBFCv11:

<?xml version="1.0" encoding="utf-8"?>
<Product ProductCode="Intuit.QBFCv11" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="qbfc 11.0.msi" PublicKey="3082...0001" />
  </PackageFiles>
  <InstallChecks>
    <FileCheck Property="Name" SpecialFolder="ProgramFilesFolder" SearchPath="Local\Downloaded Installations\{C7896CDC-45FF-49E1-A23D-68FA13A910A5}" FileName="QBFC 11.0.msi" />
  </InstallChecks>
  <Commands Reboot="Defer">
    <Command PackageFile="qbfc 11.0.msi">
      <InstallConditions>
        <BypassIf Property="Name" Compare="ValueExists" Value="N/A for ValueExists and ValueNotExists" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
      </ExitCodes>
    </Command>
  </Commands>
</Product>

这篇关于如何将QBFC13_0.msm添加到Clickonce的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆