WPF程序集的引用缺失 - 项目还在建 [英] WPF assembly reference missing - project still building

查看:1890
本文介绍了WPF程序集的引用缺失 - 项目还在建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用WPF的动态数据显示库在我的解决方案。我在我的项目加入到 DynamicDataDisplay.dll 的参考。 的xmlns:D3 =htt​​p://research.microsoft.com/DynamicDataDisplay/1.0

I am trying to use the Dynamic Data Display library for WPF in my solution. I added a reference to DynamicDataDisplay.dll in my project. I also added a namespace in the .xaml like this: xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"

智能感知是没有帮助我,当我尝试从动态数据显示库中添加一个元素。当我在我的.xaml类型是这样的:

Intellisense is not helping me when I try to add a element from the Dynamic Data Display library. When I type something like this in my .xaml:

<d3:ChartPlotter></d3:ChartPlotter>



Visual Studio将其标记为像一些文本的错误:

Visual studio will mark it as an error with some text like:

The type 'd3:ChartPlotter' was not found. Verify that you are not missing an 
assembly reference and that all referenced assemblies have been built.



但关于它的奇怪的是,它仍然编译。 ?
能有人请告诉我,我做错了。

But the odd thing about it is that it still compiles. Can someone please tell me what I am doing wrong?

下面是编译好的,但正显示出在设计的错误示例代码:

Here is a sample code which compiles fine but is showing an error in the designer:

<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>



修改

我试着像摩根Merlyn - 格雷厄姆空间声明建议,但仍然无法正常工作。发生其他错误:

I tried the namespace declaration like Merlyn Morgan-Graham suggested but it still does not work. Another error occurred:

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.



好像是程序集是下载需要手动畅通。这可以在Windows文件属性来完成。疏通和Visual Studio的问题得到解决后重新启动。

It seems like that assemblies that were downloaded need to be manually unblocked. This can be done in the Windows file properties. After unblocking and a restart of Visual Studio the problem was solved.

推荐答案

这似乎是一个模式的引用,而不是程序集引用。

This appears to be a schema reference, not an assembly reference.

这样的事情可能会更好地工作:

Something like this might work better:

xmlns:d3="clr-namespace:Microsoft.Research.DynamicDataDisplay;assembly=DynamicDataDisplay"

http://msdn.microsoft.com/en-us/library/ms747086.aspx

修改

我想我找到你正在使用的库,所以我更新了XAML命名空间引用到什么我觉得会为你工作。如果没有,检查文档,或开始编辑一些代码,并找出了CHARTPLOTTER类生活在命名空间。

I think I found the library you are using, so I updated the XAML namespace reference to what I think will work for you. If not, check the docs, or start editing some code, and figure out the namespace that the ChartPlotter class lives in.

这篇关于WPF程序集的引用缺失 - 项目还在建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆