相关疑难解决方法(0)

WPF程序集引用丢失 - 项目仍在构建中

我试图在我的解决方案中使用WPF的动态数据显示库.我DynamicDataDisplay.dll在我的项目中添加了一个引用.我还在.xaml中添加了一个名称空间,如下所示:xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"

当我尝试从动态数据显示库添加元素时,Intellisense没有帮助我.当我在.xaml中输入类似这样的内容时:

<d3:ChartPlotter></d3:ChartPlotter>
Run Code Online (Sandbox Code Playgroud)

Visual Studio会将其标记为错误,其中包含以下文字:

The type 'd3:ChartPlotter' was not found. Verify that you are not missing an 
assembly reference and that all referenced assemblies have been built.
Run Code Online (Sandbox Code Playgroud)

但奇怪的是它仍在编译.有人可以告诉我我做错了什么吗?

下面是一个示例代码,它编译得很好,但在设计器中显示错误:

<Window x:Class="WpfApplication1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
    Title="MainWindow" Height="350" Width="525">
<Grid>
    <d3:ChartPlotter></d3:ChartPlotter>
</Grid>
Run Code Online (Sandbox Code Playgroud)

编辑:

我尝试了像Merlyn Morgan-Graham建议的名称空间声明,但它仍然不起作用.发生了另一个错误

Unable to load the metadata for assembly 'DynamicDataDisplay'.
This assembly may have been downloaded from the web.
See http://go.microsoft.com/fwlink/?LinkId=179545.  The following error was encountered
during load: etc.
Run Code Online (Sandbox Code Playgroud)

看起来下载的程序集需要手动解锁.这可以在Windows文件属性中完成.解除阻塞并重新启动Visual Studio后问题得以解决.

http://www.xup.in/pic,13990010/Unblock.PNG

c# wpf assemblies

13
推荐指数
1
解决办法
2万
查看次数

标签 统计

assemblies ×1

c# ×1

wpf ×1