Ticket Q430478
Visible to All Users

that matches the specified binding constraints threw an exception

created 13 years ago

Hallo DevExpress

After I installed Visual Studio 2012, I get the following exception in our application:

Exception:
'The invocation of the constructor on type 'DevExpress.Xpf.Grid.GridControl' that matches the specified binding constraints threw an exception.' Line number '26' and line position '10'.; [(null)]; [1]
System.Windows.Markup.XamlParseException: 'The invocation of the constructor on type 'DevExpress.Xpf.Grid.GridControl' that matches the specified binding constraints threw an exception.' Line number '26' and line position '10'. —> System.Security.VerificationException: Operation could destabilize the runtime.
at DevExpress.Xpf.Core.ObservableCollectionCore`1…ctor()
at DevExpress.Xpf.Grid.DataControlBase…ctor()
at DevExpress.Xpf.Grid.GridControl…ctor()
at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.InvokeDelegate(Action`1 action, Object argument)
at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CallCtorDelegate(XamlTypeInvoker type)
at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CreateInstance(XamlTypeInvoker type)
at System.Xaml.Schema.XamlTypeInvoker.CreateInstance(Object[] arguments)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstanceWithCtor(XamlType xamlType, Object[] args)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object[] args)
— End of inner exception stack trace —
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
at System.Windows.FrameworkElement.ApplyTemplate()
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Previously we have used Visual Studio 2011, there were no problems.

Answers

created 13 years ago (modified 13 years ago)

Hello Daniel,
Our controls fully support Visual Studio 2012 and .NET Framework 4.5 starting with version 12.1.6. We are also going to release version 11.2.13 with the runtime compatibility with .NET Framework 4.5 soon.
Older versions that were released long before Visual Studio 2012 and .NET 4.5 cannot work correctly in this environment and may throw exceptions like the one you have encountered. Please use version 12.1 with Visual Studio 2012.

    Show previous comments (1)
    DevExpress Support Team 12 years ago

      We were informed that this may happen if .NET Framework v4.5 beta is installed. So, I suggest that you check what .NET Framework versions are installed on your side and update to the latest .NET Framework version. Please take a look at the following ticket, where a similar problem was discussed, to find more information on this subject:
      ID: Q408821, I just upgraded to DXperience 12.1 and nothing with WPF is working. Demo apps, demo source

        Ted,
        We're still using devexpress v11.1 because we need XBAP support. Can you release a fix for that version as well? Our customers are beginning to install .NET 4.5 and it's a serious issue for us.
        Thanks!

        DevExpress Support Team 12 years ago

          I'm afraid we cannot, because this would require significant modifications to the controls. When version 11.1 was released, Framework 4.5 didn't exist and we couldn't take it into account. When it was released, it appears that we needed to change a lot of stuff to make our controls fully compatible. That's what we did in version 11.2.13. Version 12.1 was originally developed to support this Framework, so it works fine.
          As for XBAP, it still works in newer versions in the same way it did in version 11.1. The exception you will see when trying to use our controls in an XBAP application can be disabled (it is described in the text of this exception). However, we don't support it anymore, meaning that we don't fix bugs and develop new features related to it.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.