错误消息“无法安装或运行应用程序。 该应用程序需要 GAC 中的 stdole 版本 7.0.3300.0”

发布于 2024-07-13 09:18:35 字数 330 浏览 8 评论 0原文

当一位用户尝试运行该应用程序时,我们的 ClickOnce 应用程序将报告:

无法安装或运行该应用程序。 该应用程序需要 GAC 中的 stdole 版本 7.0.3300.0。

有趣的是,GAC (C:\Windows\Assembly) 没有安装 stdole它。 我怎样才能把它拿到那里?

我们使用的是.NET 3.5,并且它已安装在这台计算机上。

When one user tries to run the application, our ClickOnce application is reporting:

Unable to install or run the application. The application requires stdole Version 7.0.3300.0 in the GAC.

It's interesting to note that the GAC (C:\Windows\assembly) does not have stdole installed in it. How do I get it there?

We are using .NET 3.5, and it has been installed on this computer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

与君绝 2024-07-20 09:18:35

尝试转到项目属性中的“发布”选项卡,然后选择“应用程序文件”按钮。 然后设置以下属性:

  • stdole.dll 的文件名
  • 发布状态包含
  • 下载组必需

之后您需要重新发布您的应用程序。

如果引用的 CopyLocal=true,则引用将随应用程序一起发布。 如果引用的 CopyLocal=false,则该引用将被标记为先决条件。 这意味着必须先将程序集安装在客户端的 GAC 中,然后才能安装 ClickOnce 应用程序。

由于 Visual Studio 安装(而不是 .NET Framework 安装),一些程序集被安装到 GAC 中。 这可能就是你的情况。

Try going to the Publish tab in the project properties and then select the Application Files button. Then set the following properties:

  • File Name of stdole.dll
  • Publish status to Include
  • Download Group to Required

After that you need to republish your application.

If the reference has CopyLocal=true, then the reference will be published with the application. If the reference has CopyLocal=false then the reference will be marked as a prerequisite. This means the assembly must be installed in the client's GAC before the ClickOnce application will install.

There are some assemblies that are installed into the GAC because of the Visual Studio install, not the .NET Framework install. This could be your situation.

不及他 2024-07-20 09:18:35

事实证明,.NET 文件已复制到 C:\Program Files\Microsoft.NET\Primary Interop Assemblies\。 但是,它们从未在 GAC 中注册。

我最终手动将 C:\Program Files\Microsoft.NET\Primary Interop Assemblies 中的文件拖动到 C:\windows\ assembly 并且该应用程序在该问题机器上运行。 您还可以使用 Gacutil

因此,.NET 在安装过程中似乎发生了一些事情,但这似乎解决了问题。 我希望这能帮助别人!

So it turns out that the .NET files were copied to C:\Program Files\Microsoft.NET\Primary Interop Assemblies\. However, they were never registered in the GAC.

I ended up manually dragging the files in C:\Program Files\Microsoft.NET\Primary Interop Assemblies to C:\windows\assembly and the application worked on that problem machine. You could also do this programmatically with Gacutil.

So it seems that something happened to .NET during the install, but this seems to correct the problem. I hope that helps someone else out!

弄潮 2024-07-20 09:18:35

就我而言,我解决了这个问题,转到项目属性中的发布选项卡,然后选择应用程序文件按钮。 然后只需:

注意: 在应用此解决方案之前,请确保您已经(像我一样)检查了所有解决方案的项目,并且没有发现对 stdole.dll< 的引用/strong> 程序集。

1 - 找到 stdole.dll 文件;

2 - 将其发布状态更改为排除

3 - 之后您需要重新发布您的应用程序

从 Visual Studio 2010 迁移后,此问题发生在 Visual Studio 2012 上。

希望它有所帮助。

I my case, I solved this issue going to the Publish tab in the project properties and then select the Application Files button. Then just:

Note: Before you apply this solution, make sure that you have already (as I did), checked all your solution's projects and found no references to stdole.dll assembly.

1 - Located stdole.dll file;

2 - Changed its Publish status to Exclude

3 - After that you need to republish your application.

This issue happened on a Visual Studio 2012, after its migration from Visual Studio 2010.

Hope it helps.

谈情不如逗狗 2024-07-20 09:18:35

我在 ClickOnce 部署时遇到了同样的问题。

我通过转到项目属性中的“发布”选项卡,然后选择“应用程序文件”按钮解决了该问题。

然后我选择了以下选项:

  • “stdole.dll”的“文件名”
  • “发布状态”为“包含”,
  • “下载组”为“必需”。

当我重新发布时,这解决了我的问题。

我希望这对你有帮助:D

I had the same problem with a ClickOnce deployment.

I solved the problem by going to the 'Publish' tab in the project properties and then selecting the 'Application Files' button.

I then selected the options:

  • 'File Name' of 'stdole.dll'
  • 'Publish status' to 'Include' and
  • 'Download Group' to 'Required'.

This fixed my problem when I re-published.

I hope this help you :D

热风软妹 2024-07-20 09:18:35

我们在使用与 Microsoft Office 互操作的 ClickOnce 应用程序时遇到了同样的问题。 仅在公司的几台计算机上发生过这种情况。

我们发现的最佳解决方案是修改有问题的计算机上的 MS Office 安装(通过程序和功能面板)并确保“.NET 可编程性功能”(不确定组件的名称 - 我们的为每个 MS Office 应用程序(Excel、Word、Outlook 等)安装了 Microsoft_Office 版本(非英语)。 这似乎不包含在默认安装中。

然后 stdole.dll 的问题得到解决。

我希望这会有所帮助。

We had the same issue with our ClickOnce application that uses Interop with Microsoft Office. It happened only on a few computers in the company.

The best fix we found out was to modify MS Office installation on problematic computers (through the Programs and Features panel) and ensure that ".NET programmability feature" (not sure of the name of the component - our Microsoft_Office versions are not English) was installed for each of the MS Office applications (Excel, Word, Outlook, etc.). This seems to not be included in a default install.

Then the problem with stdole.dll was fixed.

I hope this might help.

梦萦几度 2024-07-20 09:18:35

那么,您无法使用 ClickOnce 安装到 GAC。 这篇 MSDN 文章中对此进行了记录。

Well, you can't install to the GAC using ClickOnce. This is documented in this MSDN article.

爱,才寂寞 2024-07-20 09:18:35

我的解决方案:我在解决方案资源管理器中打开引用文件夹(显示所有文件),对于安装抱怨的每个程序集(程序集的名称可能与对象资源管理器中的程序集的文件名不完全相同,但是很容易弄清楚),我将复制本地更改为True。 我最终需要对每个 Microsoft Office/COM 相关程序集执行此操作。

My solution: I opened the references folder in Solution Explorer (showing all files), and for each assembly that the installation complained about (the name of the assembly may not be exactly the same as the filename of the assembly - within object explorer, but easy enough to figure out), I changed the Copy Local to True. I ended up needing to do that with each Microsoft Office/COM-related assembly.

┊风居住的梦幻卍 2024-07-20 09:18:35

检查您是否真正使用 EnvDTE 参考。 如果没有,请将其删除并重新编译。

Check if you're really using EnvDTE reference. If not, remove it and recompile.

寒江雪… 2024-07-20 09:18:35

有趣的是,我的项目中没有任何对 stdole 的引用,但我有一个用户仍然收到错误。 我必须添加引用,然后更改设置以包含。 希望这会起作用。

Interesting, I didn't have any references to stdole in my project, but I had a user still receiving the error. I had to add the reference, then change the setting to include. Hopefully that will work.

那小子欠揍 2024-07-20 09:18:35

致 H2oRider——您的应用程序是否访问 GAC 中的 Oracle dll? 我建议你这样做:将 dll 添加到你的项目中,并将构建操作设置为“内容”,并将“复制到输出目录”设置为“始终复制”。

然后删除 GAC 中对该 dll 的引用。 重新添加引用,但这一次深入到您刚刚添加到项目中的引用。

现在发布它。 应用程序将在本地查找 dll,并且该 dll 包含在部署中,因此它会找到它。

如果这不起作用,那么如果该 dll 包含在本地而不是包含在 GAC 中,则您可能无法使用该 dll。 对于某些程序集(例如 Office PIA)来说确实如此。 在这种情况下,部署它的唯一方法是将其包装在 setup & 中。 部署包并使用 Bootstrapper Manifest Generator 将其变成可以通过 ClickOnce 部署进行发布的先决条件。

To H2oRider -- does your application access the Oracle dll in the GAC? What I recommend you do is this: Add the dll to your project and set the build action to "content" and set "copy to output directory" to "copy always".

Then delete your reference(s) to the dll in the GAC. Re-add the reference, but this time drill down to the one you just added to your project.

Now publish it. The application will look for the dll locally, and the dll is included in the deployment so it will find it.

If this doesn't work, then it might be that you can not use that dll if included locally rather than in the GAC. This is true of some assemblies, like the Office PIAs. In that case, the only way to deploy it is to wrap it in a setup & deployment package and use the Bootstrapper Manifest Generator to turn it into a prerequisite you can publish with ClickOnce deployment.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文