添加“Microsoft Access Database Engine 2010 Redistributable”作为 clickonce 的先决条件
在我们的解决方案中,我们必须处理读取 xls 和 xlsx 文件。它非常适合我们。
是否可以添加“Microsoft Access Database Engine 2010 Redistributable”(http://www.microsoft.com/download/en/details.aspx?id=13255) 作为 ClickOnce 安装的先决条件?
这意味着 clickOne 部署应检测是否已安装“Microsoft Access Database Engine 2010 Redistributable”。如果是,则安装,否则。
不知道这样做是否可行?如果是,怎么办?
提前致谢。
In our solution, we have to deal with reading xls and xlsx files. It works perfectly for us.
Is it possible to add "Microsoft Access Database Engine 2010 Redistributable" (http://www.microsoft.com/download/en/details.aspx?id=13255) as a prerequisite in ClickOnce setup?
That means clickOne deployment should detect whether "Microsoft Access Database Engine 2010 Redistributable" has been installed or not. If yes, then install it, otherwise.
I dont know whether it is possible for doing so? if yes, how?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我非常确定您可以将此可再发行组件添加到 Visual Studio 生成的引导程序包中。 这可能会对您有所帮助。但是不行,ClickOnce 无法检测它是否已安装。
我认为您可能误解了 ClickOnce 的作用。 ClickOnce 将文件从服务器复制到客户端并保持同步。就是这样。大多数 ClickOnce 应用程序都有一些运行所需的先决条件(.NET Framework、C++ 运行时等)。 Visual Studio 将帮助您完成这些工作,并创建一个将所有这些捆绑在一起的引导程序。这与 ClickOnce 无关,这只是他们在 VS 中添加的一些东西来帮助你。 Visual Studio 还将为您创建一个 html 页面,其中包含指向 ClickOnce 应用程序和引导程序 exe 的链接;再次强调,只有 Visual Studio 可以帮助您,而不是 ClickOnce。
背后有一些“智能”的唯一先决条件是.NET Framework。这是因为生成的 html 页面可以查看浏览器的 UserAgent 字符串并告知安装了哪些版本的框架。对于所有其他先决条件,由您编写代码来处理事情,或者由用户决定是否需要运行安装。
如果您的应用程序可以在没有先决条件的情况下启动,您可以编写代码来检查它是否已安装,然后警告用户或下载并启动安装。这就是你能做的最好的了。
I'm pretty sure you could add this redistributable to the bootstrapper package Visual Studio generates. This may help you out. But no, ClickOnce cannot detect if it's been installed.
I think you may be misunderstanding what ClickOnce does. ClickOnce copies files from a server to a client and keeps them in sync. That's it. Most ClickOnce apps have a few prerequisites they need to run (.NET Framework, C++ Runtime, etc). Visual Studio will help you with these and create a bootstrapper that bundles all these together. That has nothing to do with ClickOnce, it's just some stuff they threw in VS to help you out. Visual Studio will also create an html page for you with links to the ClickOnce app and the bootstrapper exe; again, just Visual Studio helping you, not ClickOnce.
The only prerequisite that has some "smarts" behind it is the .NET Framework. That's because the html page that gets generated can look at the browser's UserAgent string and tell what versions of the framework are installed. For all other prerequisites, it's up to you to write code to handle things or up to the user to know whether they need to run the install or not.
If your app can start up without the prereq, you could write code to check if it's installed and then warn the user or download and launch the install. That's about as good as you can do.