C# XBAP 应用程序,这些可以在 Google Chrome 中使用吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/74986/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 11:12:08  来源:igfitidea点击:

XBAP Application, can these work in Google Chrome?

提问by Kieran Benton

I'm developing a .NET 3.5 XBAP application that runs perfectly fine in FF3 and IE6/7 etc. I'm just wondering if its possible to get these to run under other browsers, specifically (as its in the limelight at the moment) Google Chrome.

我正在开发一个 .NET 3.5 XBAP 应用程序,它在 FF3 和 IE6/7 等中运行得非常好。我只是想知道是否有可能让它们在其他浏览器下运行,特别是(因为它目前备受关注)谷歌浏览器。

采纳答案by Bob Wintemberg

XBAP applications do work in google chrome, however you have to set your environments PATH variable to the directory where xpcom.dll is located.

XBAP 应用程序可以在 google chrome 中运行,但是您必须将环境 PATH 变量设置为 xpcom.dll 所在的目录。

for example SET PATH=PATH;"C:\Program Files\Mozilla Firefox"

例如 SET PATH=PATH;"C:\Program Files\Mozilla Firefox"

回答by Bob Wintemberg

At the moment, XBAPs do not work in Google Chrome. I've gotten it to run once, somehow, but every time there after I've received an error that the browser cannot locate xpcom.dll. Apparently this error occurs for more than just XBAP applications. From what I've read users will have to wait for a fix seeing as Chrome is still in beta.

目前,XBAP 在 Google Chrome 中不起作用。我已经让它以某种方式运行一次,但是每次在我收到浏览器无法找到 xpcom.dll 的错误之后。显然,此错误不仅仅发生在 XBAP 应用程序中。据我所知,由于 Chrome 仍处于测试阶段,因此用户将不得不等待修复。

Update:

更新:

Looks like it's not going to be fixed: http://code.google.com/p/chromium/issues/detail?id=4051

看起来它不会被修复:http: //code.google.com/p/chromium/issues/detail?id=4051

回答by Michael Maddox

Here is another alternative solution that still requires Firefox to be installed, but you copy DLLs instead of modifying the PATH:

这是另一个仍然需要安装 Firefox 的替代解决方案,但您复制 DLL 而不是修改 PATH:

http://adrianbega.blogspot.com/2009/04/execute-xbap-in-google-chrome.html

http://adrianbega.blogspot.com/2009/04/execute-xbap-in-google-chrome.html

回答by Noora

First thing required here is to make the .Net framework 3.5 installed, once its done check whether the application is working in Mozilla Firefox, because it uses the plugin of Mozilla, if there is some issue in Mozilla, execute the aspnet_regiis.exe -irufrom Visual Studio command prompt with administrative priviledge, then set Path variable to C:\Program Files\Mozilla Firefoxand add the following DLLs to the location C:\Users\[Username]\AppData\Local\Google\Chrome\Application

这里需要做的第一件事是安装 .Net framework 3.5,完成后检查应用程序是否在 Mozilla Firefox 中工作,因为它使用 Mozilla 的插件,如果 Mozilla 有问题,请aspnet_regiis.exe -iru从 Visual Studio 命令提示符执行具有管理权限,然后将 Path 变量设置为C:\Program Files\Mozilla Firefox并将以下 DLL 添加到该位置C:\Users\[Username]\AppData\Local\Google\Chrome\Application

  • mozalloc.dll
  • mozcpp19.dll
  • mozcrt19.dll
  • mozjs.dll
  • mozsqlite3.dll
  • nspr4.dll
  • nss3.dll
  • nssutil3.dll
  • plc4.dll
  • plds4.dll
  • smime3.dll
  • ssl3.dll
  • test.txt
  • xpcom.dll
  • xul.dll
  • 文件名
  • mozcpp19.dll
  • mozcrt19.dll
  • mozjs.dll
  • mozsqlite3.dll
  • nspr4.dll
  • nss3.dll
  • nssutil3.dll
  • plc4.dll
  • plds4.dll
  • smime3.dll
  • ssl3.dll
  • 测试.txt
  • xpcom.dll
  • dll文件

and restart the browser, and check the application, if it still shows the plugin crashed, try re-installing the framework first and then Mozilla, also for Windows 7, mozilla requires to put the NPWPF.dll to the location C:\Program Files (x86)\Mozilla Firefox\plugins.

并重启浏览器,查看应用程序,如果仍然显示插件崩溃,请尝试先重新安装框架,然后再安装Mozilla,同样对于Windows 7,mozilla需要将NPWPF.dll放到该位置C:\Program Files (x86)\Mozilla Firefox\plugins

After this whole lot of hell, the application may still not debug, then publish the XBAP application and check with file and keep your finger crossed as it may work this time, this is how I made my application work in my system and checked for 5 more systems, so hope it resolve your problem too.

在经历了这么多的地狱之后,应用程序可能仍然无法调试,然后发布 XBAP 应用程序并检查文件并保持手指交叉,因为这次它可能会工作,这就是我如何使我的应用程序在我的系统中工作并检查 5更多系统,所以希望它也能解决您的问题。