Leaf.

I have created a Visual Studio project template that can be built for either Xbox 360 or Windows, by selecting the correct platform in the VS IDE. There's nothing particularly clever about this, it just uses some of the conditional abilities of MSBuild projects to merge the properties of an Xbox 360 XNA project with a Windows XNA project.

There's a slight problem though - the VS Express C# IDE has, by default, disabled the build configuration and platform settings to present a simpler interface to beginners. In order to use this project template you need to re-enable these features and should probably have a reasonable understanding of what they do. This could be the reason that the XNA devs have mentioned that building for both platforms in one project is not currently supported.

But, if you do understand the build configurations in VS and think this might be useful then you can find out a little more and download the project template here.

Cheers,
Leaf.



Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

Walther Gropius

Works a treat.

A big round of applause : )






Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

ryan.rogers

Too funny, I built the same thing last night but with a game library project as well.  The only other differences are I didn't put in my own icon, and mine are called UniversalXnaGame and UniversalXnaLibrary".  I didn't know about the __TemplateIcon.ico trick...most slick.  Hope you don't mind if I "borrow" that trick. ;-) 

I am in the middle of building a Package plugin for mine as as well as a simple installer.  This way the template will show up in the top part of the list, and is available for all users.  Granted building a VS Package is overkill for such a minor thing, but this will also serve as platform for some other ideas I have.

Incidentally, maybe I'm missing something, but I don't see why it is necessary to turn on advanced build configurations to use this   I can use my template just fine without it.  When I change the Solution Configurations or Solution Platforms it  builds the correct thing automatically  the next time I build.  Clearly I'm missing something

Thanks - Ryan





Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

waheyluggage

Excellent work!! Maybe this should be put in a sticky link or something



Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

AndyL

Now, if only someone could figure out how to run the content pipeline, XBox deployment and remote debugging on Visual Studio professional...



Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

Jim Perry

Simple - wait for the Pro version.




Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

AndyL

Jim Perry wrote:
Simple - wait for the Pro version.

If the pro version does not require you to be a signed developer with a dev box... We'll have to wait and see.





Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

waruwaru

AndyL wrote:
Now, if only someone could figure out how to run the content pipeline, XBox deployment and remote debugging on Visual Studio professional...

I gave it a shot this past week. I was able to get all the project types to show up, see the Xbox config in Tools Options (not the dialog), debug engine, and fixed some bugs in the XGSE installer bugs in the process. But unfortunately, VS2005 Pro didn't get very far creating/compiling XNA projects. I don't know enough about COM/.NET/VSIP, but to me it looks like the main DLL to handle all the XNA stuff is hard coded to invoke Express components only. I am guessing that the Pro version will have many tools build around VS2005 automations, and allowing the XGSE to install on Pro will eventually lead to similar tools available for free from the community. I am a bit irritated by the fact that I can't use the tool that I paid for in XNA/360 dev.






Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

Leaf.

Ryan,

re Advanced build configurations. My bad, XNA projects enable the advanced build configurations anyway, I hadn't noticed that (was it a change from the betas ). If you create a normal Windows (non XNA) project without advanced build configurations turned on then you should notice that the configuration and platform selection controls are disabled.

Good going on the installer etc.

Cheers,
Leaf.







Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

greywar

we really need to sticky this, or add the capability to the spacewar demo and deploy it as part of the update.




Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

Brandon Bloom

This is awesome! Can you please make a template for game libraries also

Nice work!





Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

Leaf.

Ok, I've added a template for XNA library projects also.

Cheers,
Leaf.






Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

Brandon Bloom

You're awesome! Thanks a lot.

Is there any reason why I might not want to do this It seems like the XNA team would have done this if it was that easy...





Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

XNA-Mordt

Leaf this is awesome thankyou very much




Re: XNA Game Studio Express Build for Xbox 360 and Windows in one project

AndyL

Very nice.

One thought - is there any way of getting the references to be platform specific - so that the build cannot accidentally use methods that don't exist on one of the platforms, and of course intellisense can display the correct available options