VS.NET2003 (C++) Could Not Find Assembly Microsoft.Directx.dll

gregchristensen

Newcomer
Joined
Aug 17, 2005
Messages
4
Hello all.

I have seen the other posts on a similar subject, but either I am too tired from staying up all night, or I am overlooking something very obvious.

The difference between my situation and all the others - as far as I can tell - is that I am attempting to compile managed DirectX 9.0 using C++.

There are also some other peculiarities... but without further ado:

-I am running Windows XP.
-I installed MS VS .NET 2003.
-I installed dxsdk_aug2005.exe - DirectX 9.0c SDK (August 2005): http://www.microsoft.com/downloads/...9a-02b9-447b-ab58-c12e2456e9ba&DisplayLang=en
-I installed DirectX, choosing to install all possible components (Developer, Redistributable, etc)
-I created a VS .NET C++ Empty Project.
-I am able to add the appropriate references without having to copy any files; they show by default under the .NET tab.
-Intelisense is able to resolve the Microsoft :: DirectX namespace.
*However, when compiling I get the infamous error: fatal error C1107: could not find assembly 'Microsoft.DirectX.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable
-The appropriate files are apparently on my disk in various places: %\%Program Files%\%DirectX 9.0 SDK%\, %\Windows\Microsoft .NET\%Managed%, etc, etc. Each directory also included the appropriate ++XML files and the Assembly.ini file.
-I have looked in the Redistributable *.cabs for all the Managed content, there is no *.msi and all the Microsoft.DirectX.*.dll's are again, already on my drive - so should be installed...
-I have tried adding any and all of the directories to the LIBPATH environment variable/command line option to no avail.

*One more thing, here is part of the command line from the Build - Invoked by calling: #using <Microsoft.DirectX.dll>
/FU "C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.dll"
*The file does exist in that directory.

It would appear that the appropriate files are installed and VS .NET recognizes the managed content, as again there was no problems linking the references and intelisense is happy.

Anyone have any all-powerful wisdom for me?

Thanks for your time and assistance!

Sincerely,
Greg Christensen
 
Last edited:
This may be resolved...

I just found another SDK. The "Update" I installed was ~150K. Now there is also one that is ~230K "[Non-Update]" - this may be where the problem began. I figure the "Update" has to have left something out...

I'll keep you posted.
 
Unfortunately all that did not seem to fix my problem.

I have the DirectX 9.0 SDK installed with the managed extensions, though I am still getting the linker error...

It's especially strange since like I mentioned, the files are defintely right where the compiler is pointing... therefor it doesn't seem like a VS .NET issue.

Anyone have any thoughts?

Thanks again for your time!
 
Duh...

The problem is you don't call #using <dll> on the DirectX files... you only Reference them...

On to the new error though:

After going through many hacks to get here, I am now at a stand still:

See this for a partial reference:
http://blogs.msdn.com/tmiller/archive/2004/10/05/238317.aspx

But here is the error I get now:

error C2664:
Device(
int,
DeviceType,
System::IntPtr,
CreateFlags,
PresentParameters __gc * __gc[])'

: cannot convert parameter 3 from 'Window __gc *' to 'System::IntPtr'

No constructor could take the source type, or constructor overload resolution was ambiguous

I fixed the hack for the PresentParameters, but for some reason the constructor is askin for System::IntPtr!

The Constructor *should* be:
Device(int, DeviceType, Control __gc *, CreateFlags, PresentParameters __gc * __gc[]);

Calling for a Control __gc * for param 3.


I am just completely at a stand still now...
 
Back
Top