Problem with .Net namespace

Aug 31, 2010 at 3:18 PM

Hi guys,

I'm trying to figure how to get SilverSprite for an XNA project I'm working on.  I'm trying to get silversprite workign with the most basic thing first.

II'm working with just the starting XNA template(create the project press F5 to build).  I followed the directions on the home page here and

I am still getting weird error.  It is error CS0234: the type or namespace name 'Net' does not exist.  Does anyone have any idea what could be causing

this? Thanks in advance.

 

 

Developer
Aug 31, 2010 at 10:08 PM

The "Net" namespace doesn't exists in SilverSprite as I recall it. Just remove this "using" in the top of your class files.

Aug 31, 2010 at 11:11 PM

Thanks for the reply Qbus that sort of worked.  I did that and then got an error that game.Run is not defined i commented this line out and now all that I can get is the default blue screen even after changing the code in XNA recompiling and then reimporting the .cs files into silversprite.  anyone have any ideas what i may be doing wrong?  I'm not able to get anything other than blue screen no matter what code I import into silverSprite.

 

Developer
Aug 31, 2010 at 11:14 PM

This sample project you are working on, could you zip it and put it up somewhere so I could download it? It's much easier. :)

Aug 31, 2010 at 11:20 PM

Thanks so much for your help.  you can dl it from http://rapidshare.com/files/416331253/testing.zip. 

Developer
Sep 1, 2010 at 9:34 PM

Your problem is that you tell XNA/SilverSprite that your "content" is located in a folder called "Content".

Content.RootDirectory = "Content";

Then you place your car.png in the root folder and try to load it like this:
car = Content.Load<Texture2D>("car");

That will throw an exception at you, as your .png isn't located where SilverSprite think it is. To make it work make a folder called "Content" and move your car.png into that one, then it works :)

 

Sep 1, 2010 at 9:56 PM

Still didn't make any changes.  I even tried cleaning my build as any changes I am making don't seem to have any effect.  Do I need to do something to import a compiled binary file or anything?  I really like the sound of using silverSprite and I desperately want to get this up and running with an actual game I'm working on.  Any ideas?  This doesn't make any sense to me.

Developer
Sep 2, 2010 at 10:13 AM

Thats weird, I got your sample running on my machine by doing these changes?

Are you sure you have the right tools installed? VS2010, latest Silverlight Tools etc?

 

http://www.silverlight.net/getstarted/

Sep 2, 2010 at 2:30 PM

Yes I am running Visual Studio 2010 Ultimate and I have the latest Silverlight tools I just reinstalled the tools just to make sure.  Maybe I'll try a quick reinstall of VS  and see if that works.

Sep 3, 2010 at 5:07 PM

Ok I tried reinstalling everything and it's still not working just the default Blue Screen on my web page even when I readraw the background color to anything else.  Is there an issue if using Silverlight 4 SDK?  I also tried uninstalling Silverlight 4 and using silverlight 3.  Is there anyway I could get the version that you go to compile so that i can use that as a working base and figure out where I went wrong?  Thanks.

Developer
Sep 3, 2010 at 10:40 PM

This one works on my PC.

http://dl.dropbox.com/u/230735/testing.zip

When I run it, I see a black background and a little white car (my drawing - as your car.png were just black? It's kind of hard to see on a black background ;))