添加参考问题 [英] Add reference problem

查看:86
本文介绍了添加参考问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在3D sceene中绘制一些简单的2D文本。

为此,我需要Microsoft.DirectX.Direct3D.Font类,

但是能够访问到那个班级我还需要

将参考Microsoft.DirectX.Direct3DX添加到项目中。



我已将这三个引用添加到我的解决方案使用引用/添加引用选项:



I wanted to draw some plain 2D text inside 3D sceene.
For that I need Microsoft.DirectX.Direct3D.Font class,
but to be able to acess to that class I need also to
add reference Microsoft.DirectX.Direct3DX to the project.

I have added these three references to my solution using References/Add reference option :

Microsoft.DirectX<br />
Microsoft.DirectX.Direct3D<br />
Microsoft.DirectX.Direct3DX





之后,可以在Project / References文件夹中看到上面的引用。



然后我输入了使用指令编程代码:





After that, above references can be seen inside Project / References folder.

Then I have typed in using directives to program code:

using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
using Microsoft.DirectX.Direct3DX;





当我我试图构建程序,这个错误信息出现了:



名称空间'Microsoft中不存在类型或命名空间名称'Direct3DX' .DirectX'(你错过了一个程序集引用吗?)(CS0234) - D:\ PROJEKTI \Teren \Teren \ Graphical_Matrix_Representation.cs:64,25。



如果Project / References文件夹中存在引用,这个错误怎么可能?



我试过的:



我已经阅读了类似问题的大多数答案,但我的问题无法解决。



我试图下载





When I have tried to build program, this error message came up:

The type or namespace name 'Direct3DX' does not exist in the namespace 'Microsoft.DirectX' (are you missing an assembly reference?) (CS0234) - D:\PROJEKTI\Teren\Teren\Graphical_Matrix_Representation.cs:64,25.

How this error is possible when reference exists inside Project / References folder ?

What I have tried:

I have read most of the answers to similar questions but there is no solution to my problem.

I have tried to download

Microsoft.DirectX.dll<br />
Microsoft.DirectX.Direct3D.dll<br />
Microsoft.DirectX.Direct3DX.dll





并手动添加对项目的引用,但也有相同的呃或。



and manually add reference to the project, but there is same error.

推荐答案

嗯,DirectX名称空间中不存在Direct3DX。要验证这一点,您可以在Visual Studio对象浏览器中打开Direct3D dll,并亲自查看。
Well, Direct3DX does not exist in the DirectX namespace. To verify this, you can open up the Direct3D dll in the Visual Studio object browser, and see for yourself.


这篇关于添加参考问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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