Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
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()

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
Posted
Updated 23-Feb-11 22:24pm
v3

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
 
Share this answer
 
v2
Comments
Nish Nishant 23-Feb-11 17:59pm    
Good detailed answer, my 5.
Espen Harlinn 24-Feb-11 3:38am    
Thank you Nishant!
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.
 
Share this answer
 
Comments
Espen Harlinn 24-Feb-11 16:14pm    
Are you using opos - someting that may be natural for handyman, or otherwise importing a 32-bit com/activex component into your application (32-bit excel,word,outlook) , and deploying to a 64-bit machine? If you use 32-bit com - you should mark your application as an x86 32-bit application. This is just a guess based on "Deployment manifest identity contains missing or unsupported processor architecture"

Searching google for "the manifest may not be valid or the file could not be opened" gives you a ton of guesses about what might be wrong, and possible solutions.
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)
 
Share this answer
 
Comments
Espen Harlinn 24-Feb-11 16:38pm    
Takk for det Joachim! Er dette en variant av Handyman egnet for f.eks. tablet?
Joachim Bjerke 25-Feb-11 2:25am    
Jepp det stemmer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900