Profilo di StephenBadCorporateLogoFotoBlogElenchi Strumenti Guida
12 aprile

Side-by-Side Versioning and XNA Game Studio 3.1

Obligatory Analogy

Once, I went to rent videos with my friends, Stephen and Shaun. At the video store, we ran into Stephen’s brother, Sean, and Sean’s friend, Steven. We hadn’t all seen each other in about a year, so we started chatting to catch up. A few minutes later, Sean’s new girlfriend arrived, and he introduced us all to her. She was fairly sociable, and tried to get to know us by engaging us in conversation. It didn’t take long before she started to look very confused. For the most part, we knew which of the three Stephens or two Shauns was being discussed based on who was talking, who he was talking to, the context of the story, or which way he nodded his head when he said a name. But the poor girl who’d just been introduced to us had no idea who anyone was talking about, and half the things we said didn’t seem to make any sense!

That’s kind of like what happens in a project where you try to mix assemblies from different versions of the XNA Framework. The project knows everybody, and when one assembly refers to a type from another assembly, the project knows exactly what it means. When something goes wrong, the project tries to tell you with a warning or error, but you’re like the new girlfriend – it doesn’t make any sense to hear, “No, I meant Stephen, not Steven.”

If you’ve been programming with the XNA Framework for more than a few months, you’re probably already aware that the more versions there are of the XNA Framework, the more complicated things can get. This is because XNA Framework versions are installed side-by-side, which is a fancy term meaning, “completely independent of each other, but with the same name.” When XNA Game Studio 3.1 is released later this year, it will introduce yet another side-by-side version of the XNA Framework.

To your existing XNA Framework games and projects, installing a new XNA Framework on your machine will have about the same effect as installing Adobe Reader. The existing games and projects will be completely unaware of the new framework, and its presence will have no impact at all. That is, unless you mix it up with another version.

Versioning Then and Now

To date, there have been four official releases of XNA Game Studio. The first one was called XNA Game Studio Express 1.0, the second was XNA Game Studio Express 1.0 Refresh, the third was called XNA Game Studio 2.0, and the fourth was called XNA Game Studio 3.0. Note that we dropped the “Express” part of the name in version 2.0. There were also a few beta and community technology preview (CTP) releases, but I won’t get into those.

So far, each version of Game Studio has installed side-by-side with other versions, except for XGSE 1.0 Refresh. Installing this version replaced the old version entirely. A more suitable name for it might have been XGSE 1.0 Do Over. However, with the exception of the 1.0 Refresh replacing the 1.0 version, each subsequent version can be installed side-by-side on the same machine.

The table below lists the versions of XNA Game Studio and their installation strategy.

Table 1. Game Studio Versioning
Game Studio Version SxS Install with Prior Versions Visual C# 2005 Express Edition Visual Studio 2005 (Standard+) Visual C# 2008 Express Edition Visual Studio 2008 (Standard+)
XNA Game Studio Express 1.0 N/A Yes      
XNA Game Studio Express 1.0 Refresh No Yes      
XNA Game Studio 2.0 Yes Yes Yes    
XNA Game Studio 3.0 Yes     Yes Yes

 

As you can see, it’s possible to have Game Studio 1.0, 2.0, and 3.0 all installed on the same machine. We felt that was an important feature, because it allows people to try out the new version without committing to it. If you have a class project that requires using Game Studio 2.0, but you are also working on a personal project that requires using Game Studio 3.0, you can work on both on the same machine!

XNA Game Studio 3.1 will be slightly different. :-)

XNA Game Studio 3.1 will install side-by-side with prior versions of Game Studio except version 3.0. Whaaaat?! Yes, but don’t worry, Game Studio 3.1 supports projects targeting XNA Framework 3.1 and XNA Framework 3.0. Installing XNA Game Studio 3.1 will require you to uninstall XNA Game Studio 3.0. However, all your 3.0 projects will continue to work in Game Studio 3.1 without upgrading. In addition, you’ll be able to create new projects for XNA Framework 3.1, and you’ll be able to upgrade 3.0 projects to 3.1.

In fact, it’s worth noting that projects targeting XNA Framework 3.0 will not be automatically upgraded in Game Studio 3.1. If you want to upgrade an existing project, you’ll need to use the new Upgrade Solution command found on the Project menu, or on the Project and Solution context menus. This command will upgrade all projects in the solution to XNA Framework 3.1.

For your own sanity, you should only target one version of the XNA Framework per solution. If you mix projects from different versions, you’re likely headed for trouble.

Summary

In XNA Game Studio 3.1, you can create and use projects targeting XNA Framework 3.1 in addition to XNA Framework 3.0. You need to uninstall XNA Game Studio 3.0 before installing XNA Game Studio 3.1, but you don’t have to give up working on projects targeting 3.0.

Projects targeting XNA Framework 3.0 will not be automatically upgraded to target 3.1. This lets you continue working with them as you did before. If you load a 3.0 project and you want to upgrade it to 3.1, the Upgrade Solution command will complete the operation in two or three mouse clicks.

I’ll write more about the upgrade process later, and maybe a bit about compatibility.

Commenti

Attendere...
Il commento immesso è troppo lungo. Immetti un commento più breve.
Immissione non effettuata. Riprova.
Impossibile aggiungere il commento al momento. Riprova più tardi.
Per aggiungere un commento è necessaria l'autorizzazione di un genitore. Chiedi autorizzazione
I tuoi genitori hanno disattivato i commenti.
Impossibile eliminare il commento al momento. Riprova più tardi.
Hai raggiunto il numero massimo di commenti pubblicabili giornalmente. Riprova tra 24 ore.
Impossibile lasciare commenti. La funzionalità è stata disattivata perché i sistemi hanno rilevato una possibile attività di spamming dal tuo account. Se ritieni che il tuo account è stato disattivato per errore, contatta il supporto tecnico di Windows Live.
Esegui il seguente controllo di protezione per completare la pubblicazione del commento.
I caratteri digitati nel controllo di protezione devono corrispondere ai caratteri dell'immagine o della riproduzione audio.
Stephen Styrchak ha disattivato i commenti di questa pagina.

Riferimenti

L'URL di riferimento per questo intervento è:
http://badcorporatelogo.spaces.live.com/blog/cns!43EB71B104A2D711!405.trak
Blog che fanno riferimento a questo intervento
  • Nessuno