使用Devexpress进行WPF部署 [英] WPF Deployment with Devexpress

查看:146
本文介绍了使用Devexpress进行WPF部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个问题,希望有人可以帮助我.
我有一个带有7项目的wpf应用程序,并且尝试创建一个wizzard项目,以便可以在另一台计算机上运行该应用程序.我不想将整个devexpress软件包安装到将在其上运行该应用程序的每台计算机上.
因此,我已经创建了这个wizzard项目,并通过右键单击向导项目添加了启动项目,然后选择add-> Output项目,并将statup项目添加到了我的解决方案中.我还添加了每个dll,我认为这是必需的.当我尝试运行安装程序wizad时,我可以随意安装该程序,并且似乎所有的dll都已添加.但是,当我尝试运行该应用程序时,出现此错误:

Hi,
I Have a problem I hope someone can help me with.
I have a wpf application with 7 project, and have tried to create a wizzard project so I can run the application on another computer. I dont want to install the whole devexpress package into every computer I will run the application on.
So, I have created this wizzard project, and added the startup project by rightclick on the wizard project and select add->Output project and added the statup project in my solution. I have also added every dll, I think is needed. When I try to run this setup wizad, I can somple install the program, and all the dll seems to be added. But when I try to run the application I got this error:

Application: Handyman.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Windows.Markup.XamlParseException
Stack:
   at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
   at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
   at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
   at System.Windows.Application.LoadComponent(System.Uri, Boolean)
   at System.Windows.Application.DoStartup()
   at System.Windows.Application.<.ctor>b__1(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Threading.ExecutionContext.runTryCode(System.Object)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run()
   at Handyman.Application.Main()


如果有人对此有解决方案,我将非常高兴.

顺便说一句,我正在将Visual Studio 2010 Premium与.NET 4配合使用.
我测试过的计算机上也有.net 4和Visual Studio2010.


谢谢
/Joachim


I will be really happy, if someone have a solution for this.

By the way, I am using Visual Studio 2010 premium with .NET 4
And the computer I have tested this on, also have .net 4 and visual studio 2010.


Thanks
/Joachim

推荐答案

Hei Joachim!

不,您不必部署整个DevExpress软件包-可能不太合法.

假设您使用DXBar,则可以在帮助系统的"WPF控件>产品> DXBars>产品信息>部署"下找到要与应用程序一起部署的程序集列表.
DevExpress.Data.v10.2.dll
DevExpress.Xpf.Core.v10.2.dll

与其他DevExpress产品类似.您需要将这些程序集复制到与可执行文件相同的文件夹中.如果目标计算机上安装了所需的.Net框架,那么您要做的就是将此文件夹复制到该计算机可以访问的文件夹中.

您也可以查看部署WPF应用程序(WPF) [
单击一次"部署可能正是您所需要的-并且您仍然需要包括所需的可再发行的DevExpress程序集.

要创建常规安装项目,请在解决方案上单击鼠标右键,然后选择添加新项目".导航到其他项目类型"> 设置和部署" "Visual Studio安装程序",然后选择安装项目"

使用这种安装项目来部署基于DevExpress的解决方案时,我没有遇到任何问题-与向导相比,它确实包括一些手动步骤,例如选择要从中安装主要输出的项目-通常,这会自动检测到也是必需的DevExpress程序集.

记住要在解决方案资源管理器中选择设置项目,并查看属性-特别是作者和制造商-祝您好运.

问候
Espen Harlinn
Hei Joachim!

No you don''t have to deploy the whole DevExpress package - that would probably not be quite legal.

Let''s say you use DXBars, you will find the list of assemblies to deploy together with your application under "WPF Controls > Products > DXBars > Product Information > Deployment" in the help system.
DevExpress.Data.v10.2.dll
DevExpress.Xpf.Core.v10.2.dll

It''s similar for the other DevExpress products. You need to copy those assemblies into the same folder as your executable. If the required .Net framework is installed on the target computer, all you need to do is to copy this folder to a folder accessible from that computer.

You can also have look at Deploying a WPF Application (WPF)[^] for alternatives - like "Click Once" deployment.

"Click Once" deployment may be just what you need - and you still need to include the required redistributable DevExpress assemblies.

To create a regular setup project right-click on the solution and select Add New Project. Navigate to "Other Project Types" > "Setup and Deployment" > "Visual Studio Installer" and select "Setup Project"

I''ve experienced no problems using this kind of setup project to deploy solutions based on DevExpress - it does include a few more manual steps compared to the wizard, like selecting the project you want to install the primary output from - usually this autodetects the required DevExpress assemblies too.

Remember to select the setup project in the solution explorer and review the properties - in particular Author and Manufacturer - good luck.

Regards
Espen Harlinn


感谢您的回答.
我没有尝试过clickonce选项,但出现错误:
该应用程序的格式不正确.
堆栈如下所示:
Thanks for you answer.
I have noe tried the clickonce option, but getting error:
The Application is improperly formatted.
The stack look like this:
PLATFORM VERSION INFO
    Windows             : 6.1.7601.65536 (Win32NT)
    Common Language Runtime     : 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)
SOURCES
    Deployment url          : file:///C:/Users/win7-eee/Desktop/handyman/Handyman.application
ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of C:\Users\win7-eee\Desktop\handyman\Handyman.application resulted in exception. Following failure messages were detected:
        + Exception reading manifest from file:///C:/Users/win7-eee/Desktop/handyman/Handyman.application: the manifest may not be valid or the file could not be opened.
        + Deployment manifest is not semantically valid.
        + Deployment manifest identity contains missing or unsupported processor architecture.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.
WARNINGS
    There were no warnings during this operation.
OPERATION PROGRESS STATUS
    * [24.02.2011 10:06:59] : Activation of C:\Users\win7-eee\Desktop\handyman\Handyman.application has started.
ERROR DETAILS
    Following errors were detected during this operation.
    * [24.02.2011 10:06:59] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Exception reading manifest from file:///C:/Users/win7-eee/Desktop/handyman/Handyman.application: 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.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri&amp; sourceUri, TempFile&amp; tempFile, SubscriptionState&amp; subState, IDownloadNotification notification, DownloadOptions options, ServerInformation&amp; serverInformation)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri&amp; sourceUri, TempFile&amp; tempFile, SubscriptionState&amp; subState, IDownloadNotification notification, DownloadOptions options)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String&amp; errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
        --- Inner Exception ---
        System.Deployment.Application.InvalidDeploymentException (ManifestSemanticValidation)
        - Deployment manifest is not semantically valid.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForDeploymentRole()
            at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemantics(ManifestType manifestType)
            at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
        --- Inner Exception ---
        System.Deployment.Application.InvalidDeploymentException (InvalidManifest)
        - Deployment manifest identity contains missing or unsupported processor architecture.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForDeploymentRole()
COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.


我认为这可以保留,但我对此非常了解.你有什么主意吗?
谢谢.


I think it can be something with mainifest, but I know know so much about this. Do you have any idea?
Thanks.



感谢您的帮助.
我现在已经解决了我的问题.
我忘记了一些来源,将其包括在该项目中.
但是,我现在已经学到了很多有关clickonce的发布信息,因此感谢您的专家帮助:-D

/(Joachim)
Hi,
Thanks for you help.
I have now solved my problem.
There was some sources I had forgotten to include in the project.
But I have now learned alot of the clickonce publsihing, so thank you for your expert help :-D

/(Joachim)


这篇关于使用Devexpress进行WPF部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆