本文引用了一个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` affectedChildren, UncommonField` templatedNonFeChildrenField)
在 System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List` affectedChildren)
在 System.Windows.StyleHelper.ApplyTemplateContent(UncommonField` dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
在 System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField` 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:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\14.0\Designer\ShadowCache\feehbzhp.joh\1uhu1oiz.a1d\DynamicDataDisplay.dll'. Type B originates from 'DynamicDataDisplay, Version=1908.232.13.0, Culture=neutral, PublicKeyToken=5b7d744a7263923f' in the context 'LoadNeither' at location 'C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\14.0\Designer\ShadowCache\kaq53nrp.yhz\dwylm05j.yyi\DynamicDataDisplay.dll'. 在 Microsoft.Research.DynamicDataDisplay.Charts.AxisControl`.UpdateUIResources()
在 Microsoft.Research.DynamicDataDisplay.Charts.AxisControl`..ctor()
在 Microsoft.Research.DynamicDataDisplay.Charts.NumericAxisControl..ctor()
在 Microsoft.Research.DynamicDataDisplay.Charts.NumericAxis..ctor()
在 Microsoft.Research.DynamicDataDisplay.ChartPlotter..ctor()
在 Dynamic.Control.DynamicChart..ctor()

在目录:C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\14.0\Designer\ShadowCache中发现有缓存,直接将其删除,用其他项目编译一个可用的DynamicDataDisplay类库,直接在本项目中引用类库,重新打开解决方案即可解决问题

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

到此,问题完美解决!

由于Microsoft\VisualStudio\14.0\Designer\ShadowCache导致的一个异常问题的更多相关文章

  1. 未找到导入的项目“C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props”

    未找到导入的项目“C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props” ...

  2. error MSB4019: 未找到导入的项目“C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets”

    error MSB4019: 未找到导入的项目“C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\ ...

  3. [Bug] 未找到导入的项目“C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets”

    This is very easy to do. Open your build definition and go to the "Process" page. Then und ...

  4. 未能正确加载“Microsoft.VisualStudio.Editor.Implementation.EditorPackage”包。

    最近在升级 Visual Studio 2015 Update 3 的过程中,等了很长时间都没一点进展,于是就强行终止了升级程序,但VS也因此出了问题. 后来经过修复,不行,卸载再重装,仍然提示这个错 ...

  5. VS 2013 未找到与约束contractname Microsoft.VisualStudio.Utilities.IContentTypeRegistryService...匹配的导出[vs故障]【转】

    未找到与约束 contractname Microsoft.VisualStudio.Utilities.IContentTypeRegistryService RequiredTypeIdentit ...

  6. 未找到与约束contractname Microsoft.VisualStudio.Utilities.IContentTypeRegistryService...匹配的导出

    ***以下操作后一定要重启VS,重启VS,重启VS重要的事情说三遍*** //************************************************************* ...

  7. [转]VS 2013 未找到与约束contractname Microsoft.VisualStudio.Utilities.IContentTypeRegistryService...匹配的导出

    前几天,将Visual studio 2013 update 3 升级到了update 5.打开原来的解决方案,出现了 未找到与约束 contractname Microsoft.VisualStud ...

  8. [开发笔记]-未找到与约束ContractName Microsoft.VisualStudio.Text.ITextDocumentFactoryService...匹配的导出【转载自:酷小孩】

    原文地址:http://www.cnblogs.com/babycool/p/3199158.html 今天打算用VisualStudio2012做一个js效果页面测试的时候,打开VS2012新建项目 ...

  9. 未能正确加载“Microsoft.VisualStudio.Editor.Implementation.EditorPackage”

    VS2012启动/加载项目出问题 未能正确加载“Microsoft.VisualStudio.Editor.Implementation.EditorPackage, Microsoft.Visual ...

随机推荐

  1. pgsql查询优化之模糊查询

    前言 一直以来,对于搜索时模糊匹配的优化一直是个让人头疼的问题,好在强大pgsql提供了优化方案,下面就来简单谈一谈如何通过索引来优化模糊匹配 案例 我们有一张千万级数据的检查报告表,需要通过检查报告 ...

  2. FC游戏修改教程(hack)小白文。

    FC(NES)红白机Family Computer(简称FAMICOM)(或Nintendo Entertainment System)是任天堂公司发行的第一代家用游戏机. 修改FC游戏需要的工具有 ...

  3. SpringBoot2.0集成WebSocket,实现后台向前端推送信息

    感谢作者,支持原创: https://blog.csdn.net/moshowgame/article/details/80275084 什么是WebSocket? WebSocket协议是基于TCP ...

  4. 如何在windows上玩转redis的最新特性?

    想要了解redis的最新特性,可是windows下的可以安装的版本最高为3.2,想要验证redis的诸如stream特性的话,就无能为力了. 解决方法之一在windows上安装虚拟机,然后再虚拟机上安 ...

  5. 安卓BindService笔记

    1 前言 最近学习到了安卓的service,记录一下自己对BindService的理解,学习教程以及部分代码来自菜鸟教程的android教程:菜鸟教程安卓端BindService链接 2 正文 先贴一 ...

  6. python课堂整理18---文件操作(下)

    一.b模式,字节方式(二进制的单位),rb wb ab f = open('test.py', 'rb', encoding = 'utf-8') 报错,因为用了b模式,就不能再指定编码格式了,已经指 ...

  7. spring-Scheduler

    作者:纯洁的微笑出处:http://www.ityouknow.com/ 版权所有,欢迎保留原文链接进行转载:) 在我们的项目开发过程中,经常需要定时任务来帮助我们来做一些内容,springboot默 ...

  8. set和map结构,class类

    1.set数据结构和map数据结构: (1)set: 数据结构set(集合,无序且值不能重复的数据集合,特点是key值和value值相同,没有重复的value //1 创建set ,,]) conso ...

  9. 第三章、Go-内建容器

    3.1.数组 (1)数组的定义 package main import ( "fmt" ) func main() { //用var定义数组可以不用赋初值 var arr1 [5] ...

  10. 【nodejs原理&源码赏析(9)】用node-ssh实现轻量级自动化部署

    目录 一. 需求描述 二. 预备知识 IP+端口访问 域名访问 三. Nodejs应用的手动部署 四. 基于nodejs的自动部署 4.1 package.json中的scripts 4.2 自动化发 ...