开发者

Error CS0234 When Running Racing Game Demo

开发者 https://www.devze.com 2023-02-10 13:53 出处:网络
Hi I\'m trying to run the Racing Game starter kit windows version when the multiple of these errors pop up:

Hi I'm trying to run the Racing Game starter kit windows version when the multiple of these errors pop up:

C:\Users\IDMC\Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual C#\XNA Game Stud开发者_StackOverflow中文版io 3.0\RacingGame\Shaders\ShaderEffect.cs(11,17): error CS0234: The type or namespace name 'Xna' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

I tried running the game c# project and have even created a project from existing code. I haven't touched xna in a long while so I'm kinda rusty...

Thanks in advance for your help.


Here are a few things you can check to try and rectify the error:

-Check if the correct version of XNA is installed

-Check if the correct version of the .NET framework is installed

-Check if you have the XNA dll in the references section of the solution explorer

-Check if the shader "ShaderEffect.cs" is in the same project/content project as the rest of your code

If all of this is true, try deleting the shader, commenting out all references to it, and building the program. If that doesn't work, you have a serious problem. If it does work, the shader file is broken. To fix it, I would recommend just creating a new blank shader file, copy pasting the code from the old one into the new, and then adding that to your project. If it still doesn't work, i'd have to look at the shader file's code to answer this.


This is quite straight forward. Download XNA Game Studio 3.0 here and then this will work. You may have XNA 4.0 installed, but this project is looking for XNA 3.0.

0

精彩评论

暂无评论...
验证码 换一张
取 消