"The invocation of the constructor on type 'Syncfusion.UI.Xaml.ImageEditor.SfImageEditor' that matches the specified binding constraints threw an exception."

Hello, I just updated from nuget to the latest version and now I keep hitting this error, I've tried everything i can possibly think of to no avail. Is there a solution to this? or do i need to go back a previous versions?

"The invocation of the constructor on type 'Syncfusion.UI.Xaml.ImageEditor.SfImageEditor' that matches the specified binding constraints threw an exception."

Any help will be appreciated

Thanks

5 Replies

DO Dodzi January 4, 2021 02:32 PM UTC

Downgraded to 18.4.0.30 and the issue is fixed. Now I get another error.

Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll
Initialization of 'Syncfusion.Windows.Tools.Controls.DropDownButton' threw an exception.

The thread 0x847c has exited with code 0 (0x0).
The thread 0x8878 has exited with code 0 (0x0).
System.Xaml.XamlObjectWriterException: Set property 'System.Windows.ResourceDictionary.Source' threw an exception. ---> System.IO.IOException: Cannot locate resource 'controls/sfbadge/themes/generic.xaml'.
   at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.get_ContentType()
   at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
   at System.Windows.ResourceDictionary.set_Source(Uri value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   --- End of inner exception stack trace ---
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value)
   at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
   at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
   at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)
   at System.Xaml.XamlObjectWriter.WriteEndMember()
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
   at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled, Uri& dictionarySourceUri)
   at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)
   at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
   at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
   at System.Windows.FrameworkElement.OnInitialized(EventArgs e)
   at System.Windows.FrameworkElement.TryFireInitialized()
   at System.Windows.Controls.ItemsControl.EndInit()
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)

Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll
Initialization of 'Syncfusion.Windows.Tools.Controls.DropDownButton' threw an exception.

How do i fix this?
Thanks


DO Dodzi replied to Dodzi January 4, 2021 11:41 PM UTC

Downgraded to 18.4.0.30 and the issue is fixed. Now I get another error.

Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll
Initialization of 'Syncfusion.Windows.Tools.Controls.DropDownButton' threw an exception.

The thread 0x847c has exited with code 0 (0x0).
The thread 0x8878 has exited with code 0 (0x0).
System.Xaml.XamlObjectWriterException: Set property 'System.Windows.ResourceDictionary.Source' threw an exception. ---> System.IO.IOException: Cannot locate resource 'controls/sfbadge/themes/generic.xaml'.
   at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.get_ContentType()
   at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
   at System.Windows.ResourceDictionary.set_Source(Uri value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   --- End of inner exception stack trace ---
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value)
   at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
   at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
   at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)
   at System.Xaml.XamlObjectWriter.WriteEndMember()
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
   at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled, Uri& dictionarySourceUri)
   at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)
   at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
   at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
   at System.Windows.FrameworkElement.OnInitialized(EventArgs e)
   at System.Windows.FrameworkElement.TryFireInitialized()
   at System.Windows.Controls.ItemsControl.EndInit()
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)

Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll
Initialization of 'Syncfusion.Windows.Tools.Controls.DropDownButton' threw an exception.

How do i fix this?
Thanks

I notice there is an update (18.4.0.33), but still not working as expected.

Could not load file or assembly 'Syncfusion.SfShared.Wpf, Version=18.4460.0.33, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89' or one of its dependencies. The system cannot find the file specified.

Could not load file or assembly 'Syncfusion.SfGrid.WPF, Version=18.4460.0.33, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89' or one of its dependencies. The system cannot find the file specified.

Above is the kind of errors i get when i reopen the project.
Any help will be appreciated.





SS Sridevi Sivakumar Syncfusion Team January 5, 2021 07:56 AM UTC

Hi Dodzi,

We have checked the reported query and working fine at our end. We have suspected it may occur because of a cache problem.

Please follow below steps before install or update the NuGet.

1) Please clear the NuGet cache, before using the latest one.
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache

2) Uninstall old NuGet in your application before install the latest version.

Regards,
Sridevi S. 



DO Dodzi January 5, 2021 05:51 PM UTC

This is still not working. I've tried evrything i can possibly think off. Xaml preview is not showing syncfusion controls on some projects but show default wpf ones. What could possibly be causing this?? What .net framework versions does syncfusion wpf support? could this be the cause?

Please help


SS Sridevi Sivakumar Syncfusion Team January 7, 2021 10:26 AM UTC

Hi Dodzi,

We suspect that the issue is due to version conflicts while upgrading the Syncfusion NuGet to latest version. We have created a simple sample using latest NuGet version 18.4.0.33 and the issue was not reproduced.

Please try the below steps in your application and let us know whether the issue resolved or not.

Steps: 
·         Uninstall all the Syncfusion nuget from your application and clean your project solution. 
·         Please follow below steps before install or update the NuGet. 
a. Please clear the NuGet cache, before using the latest one.
     https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cach 
b. Uninstall old NuGet in your application before install the latest version. 
·         Close the visual studio and delete Bin, Obj and Packages folder in your application location. 
·         Now open your application and install all the latest version of Syncfusion NuGet and rebuild. 
·         Now, deploy your application. 
  
Please download the simple sample from the below link.

Sample link:  https://www.syncfusion.com/downloads/support/forum/161136/ze/WpfApp1-930839136.zip

We are providing WPF support for .Net framework version 4.0 and latest.

If you still face any problem, can you revert us by modifying the attached sample based on your application scenario, this will help us to provide you a better solution at the earliest.

Regards,
Sridevi S.    


Loader.
Up arrow icon