添加WCF服务项目后Clickonce安装失败
所以我有一个winform解决方案,通过clickonce部署。 一切正常,直到我添加了 WCF 项目。 (请参阅帖子末尾解析清单文件时的错误) 现在我注意到 MSBuild 将服务编译到 _PublishedWebsites 目录中。 我不知道这样做的必要性是什么,但我怀疑这是问题的原因。此 wcf 项目引用了解决方案中的一些其他项目。 我实际上在应用程序中托管 wcf 服务,因此我实际上不需要 MSBuild 为我完成所有这一切。 有什么想法吗?
=================================================== ===================================== 平台版本信息 Windows:5.1.2600.131072 (Win32NT) 公共语言运行时:2.0.50727.3603 系统.Deployment.dll:2.0.50727.3053(netfxsp.050727-3000) mscorwks.dll:2.0.50727.3603(GDR.050727-3600) dfdll.dll:2.0.50727.3053(netfxsp.050727-3000) dfshim.dll:2.0.50727.3053(netfxsp.050727-3000)
来源 部署网址:file:///C:/applications/abc/dev/abc.Application.application
IDENTITIES 部署标识:Flow Management System.app,版本 = 1.4.0.0,文化 = 中性,PublicKeyToken = 8453086392175e0f,processorArchitecture = msil
应用程序摘要 * 可安装的应用程序。 * 设置信任 url 参数。 错误摘要 下面是错误摘要,这些错误的详细信息稍后在日志中列出。 * 激活 C:\applications\abc\dev\abc.Application.application 导致异常。检测到以下故障消息: + 从 file:///C:/applications/abc/dev/1.4.0.0/abc.Application.exe.manifest 读取清单时出现异常:清单可能无效或无法打开文件。 + 清单的解析和 DOM 创建导致错误。注意到以下解析错误: -H结果:0x80070c81 起始行:0 起始列:0 主机文件:
+ HRESULT 异常:0x80070C81
组件存储事务失败摘要 未检测到交易错误。
警告 在此操作过程中没有任何警告。
操作进展情况 * [12/03/2010 6:33:53 PM] : C:\applications\abc\dev\abc.Application.application 的激活已开始。 * [12/03/2010 6:33:53 PM] :部署清单的处理已成功完成。 * [12/03/2010 6:33:53 PM] :应用程序的安装已开始。
错误详情 在此操作期间检测到以下错误。 * [12/03/2010 6:33:53 PM] System.Deployment.Application.InvalidDeploymentException(ManifestParse) - 从 file:///C:/applications/abc/dev/1.4.0.0/abc.Application.exe.manifest 读取清单时出现异常:清单可能无效或无法打开文件。 - 来源:System.Deployment - 堆栈跟踪: 在System.Deployment.Application.ManifestReader.FromDocument(字符串localPath,ManifestTypemanifestType,UrisourceUri) 在System.Deployment.Application.DownloadManager.DownloadManifest(Uri&sourceUri,String targetPath,IDownloadNotification通知,DownloadOptions选项,ManifestType清单类型,ServerInformation&serverInformation) 在System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest部署清单,字符串targetDir,Uri部署Uri,IDownloadNotification通知,DownloadOptions选项,Uri& appSourceUri,String& appManifestPath) 在System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState,ActivationDescription actDesc,Int64 transactionId,TempDirectory&downloadTemp) 在 System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc) 在System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(UriactivationUri,布尔isShortcut,字符串textualSubId,字符串deploymentProviderUrlFromExtension,BrowserSettings browserSettings,字符串& errorPageUrl) 在 System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(对象状态) --- 内部异常 --- System.Deployment.Application.InvalidDeploymentException(ManifestParse) - 清单的解析和 DOM 创建导致错误。注意到以下解析错误: -H结果:0x80070c81 起始行:0 起始列:0 主机文件:
- 来源:System.Deployment - 堆栈跟踪: 在 System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(流流) 在 System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream) 在System.Deployment.Application.ManifestReader.FromDocument(字符串localPath,ManifestTypemanifestType,UrisourceUri) --- 内部异常 --- System.Runtime.InteropServices.COMException - HRESULT 异常:0x80070C81 - 来源:System.Deployment - 堆栈跟踪: 在 System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid) 在 System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
组件存储事务详细信息 没有可用的交易信息。
So I have a winform solution, deployed via clickonce.
Eveything worked fine until i added a WCF project. (see error in parsing the manifest file at end of post)
Now I notice that MSBuild compiles the service into a _PublishedWebsites dir.
I don't know what the need for this is, but I am suspecting this is the cause of the problem. This wcf project references some other projects within the solution.
I am actually hosting the wcf service within the application so I don't really need MSBuild to do all this for me.
Any ideas?
=====================================================================================
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.3603
System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000)
mscorwks.dll : 2.0.50727.3603 (GDR.050727-3600)
dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000)
dfshim.dll : 2.0.50727.3053 (netfxsp.050727-3000)
SOURCES
Deployment url : file:///C:/applications/abc/dev/abc.Application.application
IDENTITIES
Deployment Identity : Flow Management System.app, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8453086392175e0f, processorArchitecture=msil
APPLICATION SUMMARY
* Installable application.
* Trust url parameter is set.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\applications\abc\dev\abc.Application.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///C:/applications/abc/dev/1.4.0.0/abc.Application.exe.manifest: the manifest may not be valid or the file could not be opened.
+ Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c81
Start line: 0
Start column: 0
Host file:
+ Exception from HRESULT: 0x80070C81
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [12/03/2010 6:33:53 PM] : Activation of C:\applications\abc\dev\abc.Application.application has started.
* [12/03/2010 6:33:53 PM] : Processing of deployment manifest has successfully completed.
* [12/03/2010 6:33:53 PM] : Installation of the application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [12/03/2010 6:33:53 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///C:/applications/abc/dev/1.4.0.0/abc.Application.exe.manifest: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadManifest(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ManifestType manifestType, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
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)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c81
Start line: 0
Start column: 0
Host file:
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
at System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Runtime.InteropServices.COMException
- Exception from HRESULT: 0x80070C81
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有点困惑,你的意思是:
“我实际上在应用程序中托管 WCF 服务,因此我实际上并不需要 MSBuild 为我完成所有这些”
WCF 服务应该是一个单独的(仅服务器端)解决方案,其中包含所有仅属于服务器端的位。 clickonce 应用程序应该是仅客户端解决方案,您可以通过创建 Web 引用、为服务提供 url 等来引用 WCF 服务。
可以将 WCF 服务(服务器端)与 winforms 应用程序放在同一 .sln 中,只需确保不添加对 WCF 服务的项目引用,仅使用 Web 引用完成通信。就我个人而言,我认为完全分离客户端和服务器端项目要干净得多(话虽如此,在某些情况下在两个解决方案中共享某些项目确实有意义,例如,如果您有一个不了解持久层的业务层,那么可以共享它)。
I'm a bit confused, what do you mean by:
"I am actually hosting the wcf service within the application so I don't really need MSBuild to do all this for me"
The WCF service should be a separate (server side only) solutions with all of the bits that belong server side only. The clickonce app should be a client side only solution, you reference the WCF service by creating web references, supplying a url etc for the service.
It is possible to have the WCF service (server side) in the same .sln as the winforms app, just make sure you do not add a project reference to the WCF service, the communication is done using web references only. Personally I think it's much cleaner to completely separate client and server side projects (having said that it does make sense in some instances to share some projects in both solutions, e.g. if you have a biz layer that is persistence layer ignorant then it could be shared).