I'm following Ron Penton's Beggining C# Game Programming book and in Part 2 it begins with DirectX programming开发者_如何学编程. To start, it tells me to generate the code from the SharpDevelop's wizard then copy both AssemblyInfo.cs and MainClass.cs generated-files to the Visual C# project's folder.
After that, it tells me to add the following references to my Visual C# project: System.dll, System.Drawing.dll, System.Windows.Forms.dll, Microsoft.DirectX, and Microsoft.DirectX.Direct3D modules
. I found the directX modules in C:\Windows\Microsoft.NET
folder then added.
The sample programam compiled in SharpDevelop and my 640x420 blank window appeared. But, when I compile in Visual C# I get this error: link to image
Since I'm new at C# programming. I don't know what this could be. I know that I didn't skipped any step in my book, I think that it's an updated version which needs some extra code.
You're trying to refer to an older library that is not supported by Visual Studio 2010.
VS2010 supports .NET v2.0 or later while the one you're trying to use is v1.1.
A quick solution is to try locate Visual Studio 2003 and use it, or you can start embracing the future by using XNA.
精彩评论