zoukankan      html  css  js  c++  java
  • 由于MicrosoftVisualStudio14.0DesignerShadowCache导致的一个异常问题

    本文引用了一个DynamicDataDisplayDynamicControl两个类库,本来使用的时候都时正常的,愉快的运行着。

    DynamicDataDisplay这是一个用于动态数据可视化的WPF和Silverlight控件库。它具有高效的绑定机制和实时交互能力,能够绘制数百万个数据点。当前版本允许灵活绘制线/标记图。

    DynamicControlDynamicDataDisplay的扩展,可以使用MVVM模式。

    最近要更新一些功能需求,重新编译了项目,在使用 Automatic Versions可以自动更新软件的版本,这次编译后,运行软件发现一个巨大的问题,就是:软件只要点击曲线界面就会崩溃,查找了一天的原因也没有找到具体的解决方案。

    打开wpf界面时出现如下错误:不同引用情况出现以下两个错误问题之一

      在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       在 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       在 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       在 System.Reflection.Assembly.Load(AssemblyName assemblyRef)
       在 System.Windows.Navigation.BaseUriHelper.GetLoadedAssembly(String assemblyName, String assemblyVersion, String assemblyKey)
       在 MS.Internal.AppModel.ResourceContainer.GetResourceManagerWrapper(Uri uri, String& partName, Boolean& isContentFile)
       在 MS.Internal.AppModel.ResourceContainer.GetPartCore(Uri uri)
       在 System.IO.Packaging.Package.GetPartHelper(Uri partUri)
       在 System.IO.Packaging.Package.GetPart(Uri partUri)
       在 System.Windows.Application.GetResourceOrContentPart(Uri uri)
       在 System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       在 Microsoft.Research.DynamicDataDisplay.Legend.InitializeComponent()
       在 Microsoft.Research.DynamicDataDisplay.Legend..ctor()
       在 Microsoft.Research.DynamicDataDisplay.ChartPlotter..ctor()
       在 Dynamic.Control.DynamicChart..ctor()
    XamlParseException: 对类型“Dynamic.Control.DynamicChart”的构造函数执行符合指定的绑定约束的调用时引发了异常。
    StackTrace:
    在 System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
       在 System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
       在 System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
       在 System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
       在 System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
       在 System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
       在 System.Windows.FrameworkElement.ApplyTemplate()
       在 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       在 System.Windows.UIElement.Measure(Size availableSize)
       在 System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint)
       在 System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
       在 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       在 System.Windows.UIElement.Measure(Size availableSize)
       在 System.Windows.ContextLayoutManager.UpdateLayout()
       在 System.Windows.UIElement.UpdateLayout()
    
    InvalidCastException: [A]Microsoft.Research.DynamicDataDisplay.Charts.StackCanvas cannot be cast to [B]Microsoft.Research.DynamicDataDisplay.Charts.StackCanvas. Type A originates from 'DynamicDataDisplay, Version=2019.3.613.0, Culture=neutral, PublicKeyToken=5b7d744a7263923f' in the context 'LoadNeither' at location 'C:UsersAdministratorAppDataLocalMicrosoftVisualStudio14.0DesignerShadowCachefeehbzhp.joh1uhu1oiz.a1dDynamicDataDisplay.dll'. Type B originates from 'DynamicDataDisplay, Version=1908.232.13.0, Culture=neutral, PublicKeyToken=5b7d744a7263923f' in the context 'LoadNeither' at location 'C:UsersAdministratorAppDataLocalMicrosoftVisualStudio14.0DesignerShadowCachekaq53nrp.yhzdwylm05j.yyiDynamicDataDisplay.dll'.
    
    在 Microsoft.Research.DynamicDataDisplay.Charts.AxisControl`1.UpdateUIResources()
       在 Microsoft.Research.DynamicDataDisplay.Charts.AxisControl`1..ctor()
       在 Microsoft.Research.DynamicDataDisplay.Charts.NumericAxisControl..ctor()
       在 Microsoft.Research.DynamicDataDisplay.Charts.NumericAxis..ctor()
       在 Microsoft.Research.DynamicDataDisplay.ChartPlotter..ctor()
       在 Dynamic.Control.DynamicChart..ctor()

    在目录:C:UsersAdministratorAppDataLocalMicrosoftVisualStudio14.0DesignerShadowCache中发现有缓存,直接将其删除,用其他项目编译一个可用的DynamicDataDisplay类库,直接在本项目中引用类库,重新打开解决方案即可解决问题

    此时,出现了久违的设计界面如下:

    到此,问题完美解决!

  • 相关阅读:
    Ubuntu 14.04 配置iptables防火墙
    转 微软Sysinternals Suite工具13年12月版下载
    转详解Zoosk千万用户实时通信背后的开源技术
    Where is Silverlight now?
    A glance at C# vNext
    silverlight 进行本地串口调用的一种可行的解决方法 之silverlight端代码
    silverlight 进行本地串口调用的一种可行的解决方法
    silverlight 中javascript 代码与托管代码的互调用 以及一些思考
    使用cglib动态创建javabean
    数据库同步核心代码
  • 原文地址:https://www.cnblogs.com/sesametech-netcore/p/11381040.html
Copyright © 2011-2022 走看看