Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I'm using Prism.Unity Template Pack for my wpf application. Every thing works fine when I run the code within visual studio. But after deployment below error is being thrown on application launch. Tried looking around but couldn't understand how to fix Verification exception.
Since prism has Unity integrated within the library hence I could not able debug it. Also I looked into the source code from github and didn't find any clue.
Event Log:
Application: applaunch.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Security.VerificationException
at Unity.Storage.Registrations..ctor(Int32)
at Unity.UnityContainer..ctor()
at Prism.Unity.PrismApplication.CreateContainerExtension()
at Prism.PrismApplicationBase.Initialize()
at Prism.PrismApplicationBase.InitializeInternal()
at System.Windows.Application.<.ctor>b__1_0(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
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 MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, 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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(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.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at PrismUploadUI.App.Main()
at System.AppDomain._nExecuteAssembly(System.Reflection.RuntimeAssembly, System.String[])
at System.Runtime.Hosting.ManifestRunner.NewThreadRunner()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
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.Threading.ThreadHelper.ThreadStart()
If anybody facing this issue, I got it fixed and it is nothing to do with prism template nor any related to prism unity, it was due few tags within .csproj file that was causing this issue.
Removing <TargetZone>LocalIntranet</TargetZone> fixed my issue but I still don't understand how this tag is not getting removed even after I set this as full trusted in application properties of the project. One more thing was I did set manifest setting as create application without a manifest and yet I found this tag as <GenerateManifests>true</GenerateManifests> in csproj. I made it false then.
So guys do also check csproj file for what it is getting added.
Related
I've developed an application which contains a form and that form contains a Dev Express Scheduler. On my Dev machine, when I run the application, the application runs fine. When I run the same application of a different computer, I get the following message:
I've managed to get the Window Logs which shows the following:
Application: AGEstateAgentsTenancyManagementSystem.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
at AGEstateAgentsTenancyManagementSystem.frmMainWindow.menuItemCalendarScheduler_Click(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs)
at System.Windows.Controls.MenuItem.InvokeClickAfterRender(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
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 MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, 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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(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.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at AGEstateAgentsTenancyManagementSystem.Application.Main()
I've tried several rebuilds but all attempts have failed.
Does anyone know or experience this issue before?
menuItemCalendarScheduler_Click Content:
Private Sub menuItemCalendarScheduler_Click(sender As System.Object, e As RoutedEventArgs)
'Load the general mesage form.
Dim frmGeneralMessage As New frmGeneralMessage
frmGeneralMessage.lblGeneralMessage.Content = "Loading Scheduler / Calendar" & vbCrLf & vbCrLf &
"Please wait..."
frmGeneralMessage.Show()
'Load the calendar scheduler form.
Dim frmScheduler As New frmScheduler
frmScheduler.Show()
'Closes the general message form.
frmGeneralMessage.Close()
End Sub
I have SSMS 2017 installed on my laptop. Every time I start SSMS, it sits there for about 5 seconds, and it closes / crashes instantly without me clicking on anything. I checked out the Event Viewer. Here is what it shows:
1) .NET Runtime
Application: Ssms.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info:
System.NotImplementedException at
System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType,
Int16) at
System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16) at
System.Windows.Baml2006.Baml2006Reader.Process_ElementStart() at
System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord() at
System.Windows.Baml2006.Baml2006Reader.ReadObject(System.Windows.Baml2006.KeyRecord)
at
System.Windows.ResourceDictionary.CreateObject(System.Windows.Baml2006.KeyRecord)
at System.Windows.ResourceDictionary.OnGettingValue(System.Object,
System.Object ByRef, Boolean ByRef) at
System.Windows.ResourceDictionary.OnGettingValuePrivate(System.Object,
System.Object ByRef, Boolean ByRef) at
System.Windows.ResourceDictionary.GetValueWithoutLock(System.Object,
Boolean ByRef) at
System.Windows.ResourceDictionary.GetValue(System.Object, Boolean
ByRef) at
System.Windows.ResourceDictionary.FetchResource(System.Object,
Boolean, Boolean, Boolean, Boolean ByRef) at
System.Windows.FrameworkElement.FindResourceInTree(System.Windows.FrameworkElement,
System.Windows.FrameworkContentElement,
System.Windows.DependencyProperty, System.Object, System.Object,
Boolean, Boolean, System.Windows.DependencyObject,
System.Windows.InheritanceBehavior ByRef, System.Object ByRef) at
System.Windows.FrameworkElement.FindResourceInternal(System.Windows.FrameworkElement,
System.Windows.FrameworkContentElement,
System.Windows.DependencyProperty, System.Object, System.Object,
Boolean, Boolean, System.Windows.DependencyObject, Boolean,
System.Object ByRef) at
System.Windows.FrameworkElement.FindImplicitStyleResource(System.Windows.FrameworkElement,
System.Object, System.Object ByRef) at
System.Windows.FrameworkElement.GetRawValue(System.Windows.DependencyProperty,
System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry
ByRef) at
System.Windows.FrameworkElement.EvaluateBaseValueCore(System.Windows.DependencyProperty,
System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry
ByRef) at
System.Windows.DependencyObject.EvaluateEffectiveValue(System.Windows.EntryIndex,
System.Windows.DependencyProperty, System.Windows.PropertyMetadata,
System.Windows.EffectiveValueEntry,
System.Windows.EffectiveValueEntry, System.Windows.OperationType)
at
System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex,
System.Windows.DependencyProperty, System.Windows.PropertyMetadata,
System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry
ByRef, Boolean, Boolean, System.Windows.OperationType) at
System.Windows.DependencyObject.InvalidateProperty(System.Windows.DependencyProperty,
Boolean) at System.Windows.FrameworkElement.UpdateStyleProperty()
at
System.Windows.TreeWalkHelper.OnResourcesChanged(System.Windows.DependencyObject,
System.Windows.ResourcesChangeInfo, Boolean) at
System.Windows.TreeWalkHelper.InvalidateOnResourcesChange(System.Windows.FrameworkElement,
System.Windows.FrameworkContentElement,
System.Windows.ResourcesChangeInfo) at
System.Windows.ResourceDictionary.NotifyOwners(System.Windows.ResourcesChangeInfo)
at
System.Windows.ResourceDictionary.SetKeys(System.Collections.Generic.IList`1,
System.IServiceProvider) at
System.Windows.ResourceDictionary.SetDeferrableContent(System.Windows.DeferrableContent)
at
System.Windows.Baml2006.WpfSharedBamlSchemaContext+<>c.b__297_0(System.Object,
System.Object) at
System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(System.Object,
System.Object) at
MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(System.Xaml.XamlMember,
System.Object, System.Object) at
MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(System.Object,
System.Xaml.XamlMember, System.Object)
Exception Info: System.Windows.Markup.XamlParseException 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.LoadComponent(System.Object, System.Uri)
at Microsoft.VisualStudio.PlatformUI.VsStatusBar.InitializeComponent()
at
Microsoft.VisualStudio.PlatformUI.WorkerThreadStatusBarContainer.CreateRootUIElement()
at
Microsoft.Internal.VisualStudio.PlatformUI.WorkerThreadElementContainer.CreateHostedVisualWorker()
at
System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate,
System.Object, Int32) at
System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object,
System.Delegate, System.Object, Int32, System.Delegate) at
System.Windows.Threading.DispatcherOperation.InvokeImpl() at
System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,
System.Threading.ContextCallback, System.Object, Boolean) 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
MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext,
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
System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object,
System.Delegate, System.Object, Int32, System.Delegate) at
System.Windows.Threading.Dispatcher.LegacyInvokeImpl(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.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at
Microsoft.Internal.VisualStudio.PlatformUI.BackgroundDispatcher.ThreadProc(System.Object)
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,
System.Threading.ContextCallback, System.Object, Boolean) 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.Threading.ThreadHelper.ThreadStart(System.Object)
2) Application Error
Faulting application name: Ssms.exe, version: 2017.140.17119.0, time stamp: 0x591bcf8a
Faulting module name: KERNELBASE.dll, version:
6.1.7601.23864, time stamp: 0x595fa536
Exception code: 0xe0434352
Fault offset: 0x0000c54f
Faulting process id: 0x250c
Faulting application start time: 0x01d337a827d6ebfc
Faulting application path: C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe
Faulting module path: C:\WINDOWS\syswow64\KERNELBASE.dll Report Id: 6f1ce4e3-a39b-11e7-9593-b8763fd92420
3) Windows Error Reporting
Fault bucket 500, type 5 Event Name: CLR20r3 Response: Not available Cab Id: 0
Problem signature: P1: Ssms.exe P2: 2017.140.17119.0 P3: 591bcf8a P4:
PresentationFramework P5: 4.6.1099.0 P6: 58d87db9 P7: f9b P8: 5b P9:
System.Windows.Markup.XamlParse P10:
Why is this happening, and what must I do to resolve it?
I had this exact same issue with SSMS 17.9 and it seemed to have been caused when I uninstalled one out of my two versions of Microsoft Visual Studio that were on my computer.
After two days of attempting Re-install just SSMS, Repair, SSMS, trying to repair my .NET files, rebooting, and clearing files out of the appdata directory,
the only thing that resolved the issue for me was uninstalling all the following programs:
SSMS
Microsoft Visual Studio 2015 Shell (Isolated)
Microsoft Visual Studio Tools for Applications 2015
Microsoft Visual Studio Tools for Applications 2015 Language support
Then I ran the SSMS installer again, which installs all three of the other programs as well as SSMS. I have not seen the issue again since I have done this.
Hopefully this helps!!
Using VS 2015 and Sql Data Tools, we are trying to import the DB and every time VS is crashing with this error in Event View
Application: devenv.exe Framework Version: v4.0.30319 Description: The
process was terminated due to an unhandled exception. Exception Info:
System.Runtime.InteropServices.COMException at
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32,
IntPtr) at
Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32, Int32[])
at
Microsoft.VisualStudio.Data.Tools.Design.Common.RdtManager.GetDirtyFiles(System.Predicate'1)
at
Microsoft.VisualStudio.Data.Tools.Design.Common.RdtManager.SaveDirtyFiles(System.Predicate'1)
at
Microsoft.VisualStudio.Data.Tools.Package.Project.DatabaseProjectNode.SaveAllModelFiles()
at
Microsoft.VisualStudio.Data.Tools.Package.Project.Features.DataSchemaModelFeature.ExecuteReplacementPlan(ReplacementPlan)
at
Microsoft.VisualStudio.Data.Tools.Package.Project.Features.DataSchemaModelFeature.AddScriptsToProject(System.Collections.Generic.Dictionary'2>,
System.Nullable'1, System.Nullable'1,
System.Nullable'1, Boolean, Boolean, Boolean, Boolean,
Boolean, System.Func'4) at
Microsoft.VisualStudio.Data.Tools.Package.Project.ImportDatabaseAddScriptJob.Run()
at
Microsoft.Data.Tools.Schema.Utilities.Sql.Common.Threading2.JobManager+JobBase.b__22_0(System.Object)
at
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,
System.Threading.ContextCallback, System.Object, Boolean) 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
Microsoft.Data.Tools.Schema.Utilities.Sql.Common.Threading2.JobManager+JobBase.Microsoft.Data.Tools.Schema.Utilities.Sql.Common.Threading2.JobManager.IManageableJob.RunImpl(System.Object)
at
System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,
System.Threading.ContextCallback, System.Object, Boolean) at
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,
System.Threading.ContextCallback, System.Object, Boolean) at
System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch() at
System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
I have WPF app.In debug mode and release mode it works fine.Also, Im able to create installer using InstallShield (integrated in visual studio 2015).
But, after installing in machine, it gives me error :
Application: PerfectSmile.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
at System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
at System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
at System.Reflection.Assembly.Load(System.Reflection.AssemblyName)
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveAssembly(BamlAssembly)
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlTypeToType(BamlType)
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType, Int16)
at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16)
at System.Windows.Baml2006.Baml2006Reader.Process_ElementStart()
at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
at System.Windows.Baml2006.Baml2006Reader.Process_BamlRecords()
at System.Windows.Baml2006.Baml2006Reader.Read()
at System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter, Boolean, Boolean, Boolean, System.Xaml.IXamlLineInfo, System.Xaml.IXamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack`1<System.Windows.Markup.WpfXamlFrame>, System.Windows.Markup.IStyleConnector)
at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
Exception Info: System.Windows.Markup.XamlParseException
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.LoadComponent(System.Object, System.Uri)
at PerfectSmile.Views.Shell.InitializeComponent()
at DynamicClass.lambda_method(System.Runtime.CompilerServices.Closure, Microsoft.Practices.ObjectBuilder2.IBuilderContext)
at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext+<>c__DisplayClass1.<GetBuildMethod>b__0(Microsoft.Practices.ObjectBuilder2.IBuilderContext)
at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext)
at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext)
at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext)
at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(System.Type, System.Object, System.String, System.Collections.Generic.IEnumerable`1<Microsoft.Practices.Unity.ResolverOverride>)
Exception Info: Microsoft.Practices.Unity.ResolutionFailedException
at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(System.Type, System.Object, System.String, System.Collections.Generic.IEnumerable`1<Microsoft.Practices.Unity.ResolverOverride>)
at Microsoft.Practices.Unity.UnityContainer.Resolve(System.Type, System.String, Microsoft.Practices.Unity.ResolverOverride[])
at Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Microsoft.Practices.Unity.IUnityContainer, Microsoft.Practices.Unity.ResolverOverride[])
at PerfectSmile.Common.BootStrapper.CreateShell()
at Prism.Unity.UnityBootstrapper.Run(Boolean)
at PerfectSmile.App.OnStartup(System.Windows.StartupEventArgs)
at System.Windows.Application.<.ctor>b__1_0(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
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 MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, 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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(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.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at PerfectSmile.App.Main()
Can anyone assist me ?
Regards,
Pawan
This issue happens on version 13.0.4 (downloaded from here) (32bit) using WPF.
I'm using the WPF Crystal Report Viewer. If I click the print button, the application simply crashes showing the window telling you that you could send this information to microsoft.
To avoid any other chance of bug, I developed a sample app with a Report within showing just a label. Then the issue occurs on a machine with Windows XP service pack 3
EDIT : I traced the following stacktrace
at System.Windows.Size..ctor(Double, Double)
at SAPBusinessObjects.WPF.Viewer.ReportPaginator.GetPage(Int32)
at System.Windows.Xps.Serialization.Toolbox.GetPage(System.Windows.Documents.DocumentPaginator, Int32)
at System.Windows.Xps.Serialization.NgcDocumentPaginatorSerializer.SerializeObject(System.Object)
at System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(System.Object)
at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(System.Object, Boolean)
at System.Windows.Xps.XpsDocumentWriter.Write(System.Windows.Documents.DocumentPaginator)
at System.Windows.Controls.PrintDialog.PrintDocument(System.Windows.Documents.DocumentPaginator, System.String)
at SAPBusinessObjects.WPF.Viewer.PrintControl.Print()
at SAPBusinessObjects.WPF.Viewer.ReportAlbum.PrintReport()
at SAPBusinessObjects.WPF.Viewer.CrystalReportsViewer.PrintReport_Executed(System.Object, System.Windows.Input.ExecutedRoutedEventArgs)
at System.Windows.Input.CommandBinding.OnExecuted(System.Object, System.Windows.Input.ExecutedRoutedEventArgs)
at System.Windows.Input.CommandManager.ExecuteCommandBinding(System.Object, System.Windows.Input.ExecutedRoutedEventArgs, System.Windows.Input.CommandBinding)
at System.Windows.Input.CommandManager.FindCommandBinding(System.Windows.Input.CommandBindingCollection, System.Object, System.Windows.RoutedEventArgs, System.Windows.Input.ICommand, Boolean)
at System.Windows.Input.CommandManager.FindCommandBinding(System.Object, System.Windows.RoutedEventArgs, System.Windows.Input.ICommand, Boolean)
at System.Windows.Input.CommandManager.OnExecuted(System.Object, System.Windows.Input.ExecutedRoutedEventArgs)
at System.Windows.UIElement.OnExecutedThunk(System.Object, System.Windows.Input.ExecutedRoutedEventArgs)
at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
at System.Windows.Input.RoutedCommand.ExecuteImpl(System.Object, System.Windows.IInputElement, Boolean)
at System.Windows.Input.RoutedCommand.ExecuteCore(System.Object, System.Windows.IInputElement, Boolean)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
at System.Windows.Interop.HwndSource.InputFilterMessage(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.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.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at System.Windows.Application.Run()
at TestCrystalReports.App.Main()
Have you tried removing the printer association in the page setup of the report?
MY SOLUTION
I had no choice, I put a button over the Crystal Report Viewer's button and I called the ReportDocument's PrintToPrinter method
I had the same issue.
The crash is related to the PrintDialog and the enumeration of existing printers.
After many hours of debugging and googling i found a working solution:
Install (or reinstall) .NET framework 3.5 SP1.
This will install 'Microsoft XPS Document Writer' Printer driver.
Really don't know why, but after installation the issue magically disappeared.