Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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


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

Then I have typed in using directives to program code:

C#
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
using Microsoft.DirectX.Direct3DX;


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.
Posted
Updated 8-Nov-16 23:21pm
v9

1 solution

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.
 
Share this answer
 
Comments
Perić Željko 8-Nov-16 11:21am    
Thanks for answer.

I have done that and found out that I do not need
using Microsoft.DirectX.Direct3DX;
statement inside program code.

It is only necessary that Microsoft.DirectX.Direct3DX is referenced inside Project / References folder.

Now I can use Microsoft.DirectX.Direct3D.Font class and all other classes needed for my program.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900