Forum C# add codefile to solution

add codefile to solution

Postby RastaRalle » January 10th, 2011, 5:17 pm

hey,
I have a game with two different server types. Before the update I had two different solution files to handle this. But now I can put the two servertypes together in one solution, can't I?
So I put the Game.cs file of the second solution into the first solution and marked the game-classes with the servertype atribute.
But it doesn't work. Did I forget something?

Ralf
RastaRalle
 
Posts: 63
Joined: August 18th, 2010, 2:46 pm

Re: add codefile to solution

Postby TobiasW » January 10th, 2011, 6:00 pm

You forgot to tell us how exactly "it doesn't work" :)
User avatar
TobiasW
 
Posts: 59
Joined: August 29th, 2010, 12:31 am

Re: add codefile to solution

Postby Oliver » January 10th, 2011, 6:56 pm

Most likely you'll need to use a different namespace for each file, since otherwise you'll have to classes called the samething in the same namespace which is not allowed.

Either give them different names or different namespaces.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: add codefile to solution

Postby RastaRalle » January 10th, 2011, 8:48 pm

yeah, it's the problem with the namespaces. So I just have to change the name of the namespace in one of the files?
RastaRalle
 
Posts: 63
Joined: August 18th, 2010, 2:46 pm

Re: add codefile to solution

Postby Oliver » January 11th, 2011, 1:46 pm

Yep!
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to C#



cron