如何将QBFC13_0.msm添加到Clickonce [英] How to add QBFC13_0.msm to Clickonce
问题描述
网络上似乎没有关于如何执行此操作的逐步记录.如果提到它,那么它的文献记录很少,我无法遵循他们建议的复杂路径. 我是ClickOnce的新手,我已经能够将c#程序正确安装在用户计算机上,但是当然我得到了"22E88GD7-FB0B-B905-CCA6BD526B52"未注册的类",这意味着我相信用户计算机上未安装QBFC13.我的客户不希望在ClickOnce之外使用标准QB安装程序单独安装QBFC,而是希望将其作为ClickOnce的一部分.真的是那么复杂且记录不充分的过程吗?我见过的所有google搜索和stackoverflow条目都没有提供一种轻松或完全做到这一点的方法,以便新手可以做到.救命!
在VS2012中,您需要添加先决条件(项目属性->发布->先决条件...)./p>
但是,默认情况下,QBFC不在列表中,因此需要 Microsoft的Bootstrapper清单生成器来创建自己的.不幸的是,这是越野车和令人困惑的事情.所以,这就是你的做法:
- 新项目-选择打包清单"
- 项目名称-此清单项目的保存"名称在此处"
-
在树中,依次单击软件包",然后单击添加安装文件"-浏览到.msi或.exe
ex: C:\Users\{username}\AppData\Local\Downloaded Installations\{C7896CDC-45FF-49E1-A23D-68FA13A910A5}\QBFC 11.0.msi
-
显示名称-将在Visual Studio中显示的名称"
ex: QuickBooks Foundation Classes v11.0
- 属性"标签-不需要,跳过
-
系统检查-单击第一个图标文件检查"
-
结果属性-您要测试的步骤3中的文件属性
ex: Name
- 要搜索的文件名-与第3步选择相同的文件
-
在特殊文件夹中开始搜索-将其与步骤#6.2匹配
ex: AppDataFolder
-
路径-将其与步骤#6.2
匹配ex: \Local\Downloaded Installations\{C7896CDC-45FF-49E1-A23D-68FA13A910A5}
-
- 安装条件"选项卡
- 类型-ByPassIf
- 属性-从步骤#6.1中选择标识符
- 比较-存在
- 值-不适用
- 退出代码"标签
- 退出码-0
- 结果-成功
- 保存您的工作,然后构建"(CTRL + SHIFT + B)
- 构建结果"对话框-单击构建输出"链接
-
将整个文件夹移动/复制到:
[VS2012] C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\
- 重新启动Visual Studio,新的必备组件将出现在列表中!
- 现在,只需在项目属性"->发布"->先决条件..."下选择它,然后发布
这是我为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:
- New Project - select "Package Manifest"
- Project Name - "The 'save' name of this manifest project goes here"
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
Display Name - "The name that will show up in Visual Studio"
ex: QuickBooks Foundation Classes v11.0
- Properties tab - not needed, skip
System Checks - click the first icon "File Check"
Property for Result - The file property from Step #3 that you'd like to test
ex: Name
- File name to search for - pick the same file as in Step #3
Start Search in Special Folder - match this to Step #6.2
ex: AppDataFolder
Path - match this to Step #6.2
ex: \Local\Downloaded Installations\{C7896CDC-45FF-49E1-A23D-68FA13A910A5}
- Install Conditions tab
- Type - ByPassIf
- Property - select the identifier from Step #6.1
- Comparison - Exists
- Value - N/A
- Exit Codes tab
- Exit Code - 0
- Result - Success
- Save your work, then "Build" (CTRL+SHIFT+B)
- Build Results dialog - click the "Build Output" link
Move/Copy this entire folder to:
[VS2012] C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\
- Restart Visual Studio and your new Prerequisite will be in the list!
- 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屋!