DirectX issue?
Ok...I have scoured the Internet from MSDN to Google trying to find the answer to this one....As I am new to the whole DirectX scene, I was viewing the Webcast for using C# with DirectX in game development, namely the Star Trooper game, if anybody has seen that one.
I originally could not build the downloaded projects without many errors, but I installed the April sdk and now I can build all of them. The Problem is that when I Publish, I can no longer run the program...I get an error in:
clr20r3
p4 microsoft.directx.direct3dx
exception code 0xe0434f4d
FYI I have win xp pro, c# express, Directx9.0c, net 2.0 framework, april and oct sdk installed.
It just seems weird that I can debug but not publish a working example.
And just to add to it the actual exe files (downloaded with project) run ok.
If this made any sense, maybe somebody has a clue :o)
How are you publishing the application, and does the published app run on your local machine. Have you tried it on other machines?
One thing that you must remember when distributing Managed DirectX applications is that you must match the Redist of the SDK to the version that the application was developed in. Another of the big problems that I see a lot is the content files that are included in the application. With this I mean that the applications are developed with the paths hard coded in, and when published these paths change, one method that I use is to add the media to the solution and then change the content properties so that it gets copied to the output directory on build. For an example of this I have written a small article for Coding4Fun that adds content to a project and includes it on final build. Also I have included a link to a discussion on Inner Realm that talks about distributing Managed DirectX programs.
From the error that you have supplied I can not really help with the problem as it is hard to work out, you might want to add some error checking into the application. I know that the Webcast was mainly designed around building the game, and not the final product. Generally there is not much in the way of error handling as the authors mainly try to get the content out first.
Coding4Fun - Creating an Application Template
Inner Realm - Distributing Managed DirectX Applications
Hope this Helps,