问题描述
我是新来部署.NET应用程序,所以请让我知道,如果需要任何更多的细节。
I'm new to deploying .NET apps, so please let me know if any more details are required.
我公司开发的Visual Studio与MySQL一个C#控制台应用程序。这是部署在2的Windows 7通过ClickOnce应用程序的机器和工作正常。尝试将Windows XP计算机上安装并得到了以下错误:
I developed a C# console app in Visual Studio with MySql. This was deployed on 2 Windows 7 machines via ClickOnce Application and works fine. Tried to install in on a Windows XP machine and got the following error:
系统需要更新:
无法安装或运行应用程序。该应用程序要求
该组件MySql.Data版6.5.4.0被安装在全球
程序集缓存(GAC)第一。
Unable to install or run the application. The application requires that assembly MySql.Data Version 6.5.4.0 be installed in the Global Assembly Cache (GAC) first.
我做了一些谷歌上搜索,我不认为这是任何已经提到的问题 - 没有防火墙,杀毒软件不上管理员帐户的所有权限。我检查C:\\ WINDOWS \\大会和MySql.Data.CF.dll V 6.5.4.0上市。
I've done some googling and I don't think it's any of the issues that have been mentioned - no firewall, no antivirus, on Administrator account with all permissions. I checked C:\Windows\Assembly and MySql.Data.CF.dll V 6.5.4.0 is listed.
同事还挖出了以下错误日志:
Coworker also dug up the following error log:
平台版本信息Windows:5.1.2600.196608(Win32NT)通用
语言运行时:4.0.30319.1 System.Deployment.dll:4.0.30319.1
(RTMRel.030319-0100)clr.dll:4.0.30319.1(RTMRel.030319-0100)
dfdll.dll:4.0.30319.1(RTMRel.030319-0100)dfshim.dll:
4.0.31106.0(Main.031106-0000)
来源部署URL:
文件:/// C:/GearBox/app/publish/ClockworksConsoleApplication.application
应用程序URL:
file:///C:/GearBox/app/publish/Application%20Files/ClockworksConsoleApplication_1_0_0_6/ClockworksConsoleApplication.exe.manifest
SOURCES Deployment url : file:///C:/GearBox/app/publish/ClockworksConsoleApplication.application Application url : file:///C:/GearBox/app/publish/Application%20Files/ClockworksConsoleApplication_1_0_0_6/ClockworksConsoleApplication.exe.manifest
恒等式部署身份:
ClockworksConsoleApplication.application,版本= 1.0.0.6,
文化=中性公钥= efa8c6cf1fc52128,
的ProcessorArchitecture = MSIL应用程序标识:
ClockworksConsoleApplication.exe,版本= 1.0.0.6,文化=中立,
公钥= efa8c6cf1fc52128,的ProcessorArchitecture = MSIL,
类型=的Win32
IDENTITIES Deployment Identity : ClockworksConsoleApplication.application, Version=1.0.0.6, Culture=neutral, PublicKeyToken=efa8c6cf1fc52128, processorArchitecture=msil Application Identity : ClockworksConsoleApplication.exe, Version=1.0.0.6, Culture=neutral, PublicKeyToken=efa8c6cf1fc52128, processorArchitecture=msil, type=win32
应用摘要*可安装的应用程序。
APPLICATION SUMMARY * Installable application.
错误摘要以下是错误的摘要,这些细节
错误以后在日志中列出。 *激活
C:\\齿轮箱\\程序\\发布\\ ClockworksConsoleApplication.application
导致异常。检测到下列失败消息:+
无法加载运行。 (异常来自HRESULT:0x80131700)
ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of C:\GearBox\app\publish\ClockworksConsoleApplication.application resulted in exception. Following failure messages were detected: + Failed to load the runtime. (Exception from HRESULT: 0x80131700)
组件存储事务失败摘要任何事务错误是
检测。
COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected.
警告此操作过程中未出现任何警告。
WARNINGS There were no warnings during this operation.
操作进度状态* [2012年8月31日上午9时56分○○秒]:激活
C:\\齿轮箱\\程序\\发布\\ ClockworksConsoleApplication.application有
启动。 * [2012年8月31日上午09时56分02秒]:部署清单加工
已成功地完成了。 * [2012年8月31日上午09时56分02秒]:安装
应用已经开始。 * [2012年8月31日上午09时56分02秒]:处理
应用程序清单中已成功完成。 * [2012年8月31日
上午09时56分08秒]:找到兼容运行时版本2.0.40607
OPERATION PROGRESS STATUS * [8/31/2012 9:56:00 AM] : Activation of C:\GearBox\app\publish\ClockworksConsoleApplication.application has started. * [8/31/2012 9:56:02 AM] : Processing of deployment manifest has successfully completed. * [8/31/2012 9:56:02 AM] : Installation of the application has started. * [8/31/2012 9:56:02 AM] : Processing of application manifest has successfully completed. * [8/31/2012 9:56:08 AM] : Found compatible runtime version 2.0.50727.
错误详细以下错误。
* [2012年8月31日上午09时56分08秒] System.Runtime.InteropServices.COMException
- 无法加载运行。 (异常来自HRESULT:0x80131700)
- 资料来源:System.Deployment
- 堆栈跟踪:在System.Deployment.Application.NativeMethods.IClrMetaHostPolicy.GetRequestedRuntime(MetaHostPolicyFlags
policyFlags,字符串binaryPath,IStream的configStream,StringBuilder的
版本的Int32&安培; versionLength,StringBuilder的imageVersion,的Int32&安培;
imageVersionLength,的Int32&安培; pdwConfigFlags中GUID interfaceId)在
System.Deployment.Application.NativeMethods.GetAssemblyCacheInterface(字符串
CLRVersionString,布尔FetchRuntimeHost,CCorRuntimeHost&安培;
RuntimeHost)在
System.Deployment.Application.PlatformDetector.VerifyPlatformDependencies(AssemblyManifest
appManifest,AssemblyManifest deployManifest,字符串的tempDir)在
System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState
子状态,ActivationDescription actDesc,Int64的transactionId,有无,
TempDirectory&安培; downloadTemp)在
System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState&安培;
子状态,ActivationDescription actDesc)在
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(URI
activationUri,布尔isShortcut,字符串textualSubId,字符串
deploymentProviderUrlFromExtension,BrowserSettings browserSettings,
串放; errorPageUrl)在
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(对象
状态)
ERROR DETAILS Following errors were detected during this operation. * [8/31/2012 9:56:08 AM] System.Runtime.InteropServices.COMException - Failed to load the runtime. (Exception from HRESULT: 0x80131700) - Source: System.Deployment - Stack trace: at System.Deployment.Application.NativeMethods.IClrMetaHostPolicy.GetRequestedRuntime(MetaHostPolicyFlags policyFlags, String binaryPath, IStream configStream, StringBuilder version, Int32& versionLength, StringBuilder imageVersion, Int32& imageVersionLength, Int32& pdwConfigFlags, Guid interfaceId) at System.Deployment.Application.NativeMethods.GetAssemblyCacheInterface(String CLRVersionString, Boolean FetchRuntimeHost, CCorRuntimeHost& RuntimeHost) at System.Deployment.Application.PlatformDetector.VerifyPlatformDependencies(AssemblyManifest appManifest, AssemblyManifest deployManifest, String tempDir) at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp) at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
组件存储事务详细信息没有交易信息
可用。
COMPONENT STORE TRANSACTION DETAILS No transaction information is available.
我是previously得到另一个错误的安装,
I was previously getting another error at install,
URLDownloadToCacheFile失败,HRESULT'-2146697211'错误:
出错试图下载
'HTTP://station52/clockworksEXE/ClockworksConsoleApplication.application
不过,我改变了我的设置,从CD,而不是网站的发布,它似乎已经解决了这个,但我仍然得到GAC错误。
however, I changed my settings to publish from CD instead of website and it seems to have solved this, but I'm still getting the GAC error.
任何想法?
推荐答案
一个解决方案是包括MySQL的DLL作为应用程序的一部分。设置DLL为包括地方和/或包含在发布应用程序的设置。
A solution would be to include the MySQL dll as part of your application. Set the dll to "include local" and/or "include" under the Publish Application settings.
当您的ClickOnce应用程序部署这种方式,该dll局部与它一起部署,也不会寻找它在GAC中。
This way when your ClickOnce app is deployed, the dll is deployed locally along with it and will NOT look for it in the GAC.
通常情况下,东西在GAC都安装有其它应用程序共享,并尽可能的ClickOnce而言,通常被安装为prerequisites。不必包括组件与您的应用降低了部署的大小,当然,还有让您的应用程序使用在GAC已经共享该组件。
Typically, things in the GAC are installed there for other applications to share and as far as ClickOnce is concerned, are usually installed as prerequisites. Not having to include a component with your application reduces the size of your deployment, of course, as well as allowing your application to use that component that is already shared in the GAC.
您有明显的问题,有一些使用ClickOnce和WinXP和解决方案做的是只包括与您的应用MySQL的组成部分,并用它来本地您的应用程序。
The problem you are having apparently has something to do with ClickOnce and WinXP and the solution would be to just include the MySQL component with your application and use it locally to your app.
这篇关于ClickOnce应用程序会抛出错误" ..需要组装MySql.Data版本6.5.4.0安装在全局程序集缓存(GAC)第一"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!