Game Development Community

Help! I upgraded to 3.1 [RESOLVED]

by Randy Lutcavich · in Torque X 2D · 09/05/2009 (4:27 am) · 14 replies

Okay so I upgraded to XNA 3.1 and Torque X 2D 3.1 Pro but now I can't do anything!!

I'm simply trying to do the splash screen tutorial from John's book (using his updated files off of TorqueXBook.com of course) and I am getting some weird compiler errors.



The referenced assembly "C:UsersRandyDocumentsVisual Studio 2008ProjectsDots 1.0Dots 1.0TorqueCorebinx86DebugGarageGames.TorqueX.Framework.dll" was not found. If this assembly is produced by another one of your projects, please make sure to build that project before building this one.

The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='Debug' Platform='Xbox 360'

The type or namespace name 'T2D' does not exist in the namespace 'GarageGames.Torque' (are you missing an assembly reference?) C:UsersRandyDocumentsVisual Studio 2008ProjectsDots 1.0Dots 1.0TorqueCoreGuiSplashScreen.cs

'Microsoft.Xna.Framework.Game' does not contain a definition for 'Instance' C:UsersRandyDocumentsVisual Studio 2008ProjectsDots 1.0Dots 1.0TorqueCoreGuiSplashScreen.cs

The type or namespace name 'GarageGames' could not be found (are you missing a using directive or an assembly reference?)

'StarterGame2D.Game' does not contain a definition for 'Run' and no extension method 'Run' accepting a first argument of type 'StarterGame2D.Game' could be found (are you missing a using directive or an assembly reference?)


There are more just like these. In total, there are 64 errors! Does 3.1 just not work? Am I missing something? I'm using MS Visual C# 2008 Express, does this matter at all? Please, help. This is very frustrating!! I'm dead in the water now. Do I just have to go back to 3.0?





#1
09/05/2009 (3:17 pm)
Any ideas? It may have to do with the fact that TX2D Pro comes with the source and I'm no familar with how to compile it. Is there anything special I need to do?
#2
09/05/2009 (4:51 pm)
Oh man, that reminds me... I need to update the sample code on the Website to Torque X 3.1 - sorry about that.

Open the Solution Explorer, expand all of the Project nodes, and then expand all of the Reference nodes within them. You will probably see the a warning icon next to the offending DLL reference. Make a note of the name (such as TorqueCore, Torque2D, Torque3D) and then delete it. Next, right-click the node labeled "References" and choose "Add Reference...". In the popup dialog box, choose the .NET tab and look for an assembly named "GarageGames.Framework.Torque2D" or an equivalent.

This points your project to the Torque X assembly registered with the GAC. That should address the missing assembly references.

John K.
www.envygames.com
#3
09/05/2009 (6:22 pm)
I'm at work right now but I attempted to try your fix with a new project. Here's what I did and what I am seeing.

I started the project with the Starter Game 2D template and it built and debugged fine. (All warnings went away after running the project).

I then added your code for the Splash Screen (GuiSplashScreen.cs and the methods needed in Game.CS). Here I saw more random errors like the ones above. I went expanded the nodes you mentioned but I did not see any warning icons at this time. I did see those on my project at home though. So I did not delete anything. Instead I just skipped to the part about adding the refences. I did not see the "GarageGames.Framework.Torque2D" reference so I just added both the "GarageGames.TorqueX.Framework" and "GarageGames.TorqueX.Framework2D" references. That didn't seem to work like I had hoped. I now get 53 warnings and 4 errors.

Here is one of the errors that looks pretty serious:
The name 'GUICanvas' does not exist in the current context C:\Starter Game 2D (3.1) Pro1\Starter Game 2D (3.1) Pro1\Game\Game.cs
#4
09/05/2009 (8:38 pm)
Any idea when you might get the chance to update your sample code John?

Thanks for all your help!
#5
09/06/2009 (11:09 pm)
Ok so is there something wrong with my installation or the StarterGame2D template?

Because when I rebuild the project after first making it, I get 6 warnings. They all go away after running the project but I don't see why there are errors when I first make a project.

'GarageGames.Torque.SceneGraph.SceneRenderState._isStencilPass' is never assigned to, and will always have its default value false C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots\Dots\TorqueCore\SceneGraph\SceneGraph.cs

'GarageGames.Torque.T2D.T2DTileObject.FlipX' hides inherited member 'GarageGames.Torque.T2D.T2DSceneObject.FlipX'. Use the new keyword if hiding was intended. C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots\Dots\Torque2D\T2D\T2DTileLayer.cs

'GarageGames.Torque.T2D.T2DTileObject.FlipY' hides inherited member 'GarageGames.Torque.T2D.T2DSceneObject.FlipY'. Use the new keyword if hiding was intended. C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots\Dots\Torque2D\T2D\T2DTileLayer.cs

'GarageGames.Torque.T2D.T2DTileObject.Clone()' hides inherited member 'GarageGames.Torque.T2D.T2DSceneObject.Clone()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots\Dots\Torque2D\T2D\T2DTileLayer.cs

Warning compiling C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots\Dots\TorqueCore\EngineData\effects\LightingEffect2D.fx: warning X4707: texcoord inputs used directly (that is, other than sampling from textures) in shader body in ps_1_1 are always clamped from 0 to 1 C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots\Dots\TorqueCore\EngineData\effects\LightingEffect2D.fx

Warning compiling C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots\Dots\TorqueCore\EngineData\effects\LightingEffect3D.fx: warning X4707: texcoord inputs used directly (that is, other than sampling from textures) in shader body in ps_1_1 are always clamped from 0 to 1 C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots\Dots\TorqueCore\EngineData\effects\LightingEffect3D.fx

The more code I attempt to the add, the more trouble I get into.

John's steps above don't seem to apply to my errors.

#6
09/07/2009 (5:02 am)
This has been resolved.

Thank you for your help John. It was the messed up references that was causing all my troubles.

I wasn't able to find the "GarageGames.Framework.Torque2D" but Henry showed me which references to delete in this thread:
www.garagegames.com/community/forums/viewthread/101151/1#comment-673013

Thanks again for helping.
#7
09/07/2009 (1:43 pm)
Excellent, I'm glad this is working again. I'll get to updating those Torque X book samples later today.

John K.
www.envygames.com
#8
09/07/2009 (3:51 pm)
You're amazing, thanks!
#9
09/10/2009 (6:38 am)
I haven't been able to get this working. I can replace the references with 3.1 versions, but when I rebuild I get an error saying that it can't find the TextureImporter. This is one of the components under Content/References. I can revert it back to the 3.0 version and it will build, but then the program won't run, and the debugger reports "The program '[6080] Game.exe: Managed' has exited with code 7 (0x7).".

Any suggestions would be appreciated. :-)
#10
09/10/2009 (12:15 pm)
My suggestion is to start from a clean slate but if you already have significant work done on a project, that might not be possible.

If you can though, start a brand new project with the StarterGame2D Pro (3.1) and follow Henry's steps from the link above:

Quote:When I create a new project I first build the TorqueCore. Right click TorqueCore and select build.

Then go to the Torque 2D, Open up the references, and remove Torque Core. It may not be correct. Then right-click Torque2D, add reference. Select project tab, select TorqueCore, OK.

Next right-click the Torque2D and build that.

Finally go to your Game, and remove the torque references, TorqueCore and Torque2D. Just like before, Right click and add references, select project tab, select both TorqueCore and Torque2D, you can do them both at once if you desire.

Finally build everything. TaDa!!

I wouldn't mess with any other references. If you have completely uninstalled 3.0 and installed 3.1 then the above steps should work.

If you still want to try and use 3.0 and are trying to solve your TextureImporter problem, I suggest using the Debugging option in VS and seeing where it takes you in the code when you crash. Often when I get 'exited' like that and I run debug it points me to a missing image or something I had linked to the project wrong. If this isn't the case for you then it may just be the upgrade to 3.1 that messed everything up.

Again, I'd try to start from a clean slate. 3.1 does work, it just takes some work to get it up and running. When you do get it working be sure to look at my audio crash thread to figure out how to get the TXB working.

Hopefully all of this is fixed in the update that is coming out next month.
#11
09/10/2009 (3:16 pm)
New projects are working great, it's old ones where I run into trouble when upgrading their references. I've tried copying the assets out of an old project and dropping them into a new solution, and the code handles that just fine but Torque doesn't seem to like it; I run into errors based on the versioning in the XML files.

An example of this would be the ChopperStrike from the textbook, which doesn't run under 3.1. It doesn't work and I wasn't able to get it working by replacing the references (per earlier message above).

I don't mind waiting for the new version (per John's post above), but I figured while I was waiting I'd try dropping the TGB assets into a new project. So I created a new project, dropped Game.txproj and torqueSettings.xml into the solution, added the image assets, dropped the level into the levels folder, and rebuilt. The rebuild went fine, but when I try to run I get a debugger halt and error on Screenloader.load saying "No parameterless constructor defined for this object".

I assume this is due to the various changes in Torque along the way, so I'm just stopping at this point (since I resolved my main question anyway in that other thread). I'm fine at the moment but if anything about this leaps out at you to try I'd love to hear it. :-)
#12
09/10/2009 (4:38 pm)
Ah well I don't have experience with this since I just decided to start from scratch with my project on 3.1 but...

Have you tried Upgrading to 3.1?

Instead of fixing the references for every 3.0 reference (you may have to do this for the ones we talked about earlier)you can right click your 3.0 Game project and there should be an option to Upgrade to 3.1.
#13
09/10/2009 (5:06 pm)
Sweet, that seems to have solved the TextureImporter error!

Basically I was opening the csproj and VS was running the upgrade to get it to 3.0, and then I was manually replacing the references -- I didn't realize there was another wizard that could be run to get it to 3.1.

Thanks Randy! =8^D


Note: Just to document this for other potential searchers, here is a complete list of steps required to update the old ChopperStrike program from John Kanalakis' textbook (Chapter 9 code sample). This takes it from XNA 1.0 to XNA 3.1. This assumes you have already upgraded your computer to XNA 3.1 and TX2D 3.1.

1) Extract the project from the ZIP archive.
2) Drill down into the folders until you find the game.csproj file and double-click it (runs Visual Studio or C# Express).
3) Follow the wizard, which upgrades it to 3.0. (You don't need to make a backup since you have the ZIP.)
4) In Solution Explorer, right-clicked on the word "Game", then selected "Upgrade Solution". It brings up a dialog box saying it will upgrade it from XNA 3.0 to 3.1. Click "Upgrade" and it will replaces the Microsoft references under "References" and "Content(data)".
5) When that process is done, expand the "References" folder and right-click on the yellow-errored GarageGames reference and select "Remove".
6) Right-click on the References folder and select "Add Reference..."
7) From the .NET tab, scroll through the list for the Garage Games references. You want GarageGames.TorqueX.Framework and GarageGames.TorqueX.Framework2D for this one. Select both of them and click on OK.
8) Rebuild the project and run it. Should work now.
#14
09/10/2009 (7:13 pm)
Yay!

Glad that all worked out, man.