Jump to content

  • Log In with Google      Sign In   
  • Create Account

Having trouble converting code from 3.1 to 4.0


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 Jamison73   Members   -  Reputation: 122

Like
0Likes
Like

Posted 03 February 2011 - 08:55 AM

I am having trouble with the books code. I need to focus on learning concepts, but converting code from XNA 3.1 to XNA 4.0 is proving very troublesome. Does anyone have any advice for dealing with this? Has the code already been upgraded to XNA 4.0 somewhere? Or is there a standard rule sheet of what changed between 3.1 and 4.0?

Thanks,
Jamison

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9596

Like
0Likes
Like

Posted 03 February 2011 - 09:17 AM

Near the very end of the main workshop thread for this week there's an updated version of the code for XNA 4.

#3 Jamison73   Members   -  Reputation: 122

Like
0Likes
Like

Posted 03 February 2011 - 11:30 AM

Thanks Crane, I found the week 1 code too. This makes life much easier ;) Jamison

#4 dechorus   Members   -  Reputation: 120

Like
0Likes
Like

Posted 10 February 2011 - 11:59 PM

Hey guys,

When I download the code provided and open them up, I'm getting very odd errors regarding references. I've attached a screenshot.


Now, I can start new projects in XNA 4.0 and things are fine, but opening up the chapter and lesson source code from this workshop results in this error.

Does anybody have a solution? Much appreciated

Attached Thumbnails

  • screeny.gif


#5 ChaosFollowing   Members   -  Reputation: 122

Like
0Likes
Like

Posted 11 February 2011 - 12:21 AM

Hey guys,

When I download the code provided and open them up, I'm getting very odd errors regarding references. I've attached a screenshot.


Now, I can start new projects in XNA 4.0 and things are fine, but opening up the chapter and lesson source code from this workshop results in this error.

Does anybody have a solution? Much appreciated


That is strange(if you can create XNA 4.0 projects just fine).

Have you tried copy-pasting the lesson code into a new project?

EDITED TO ADD: Also, if you're double-clicking on the project files to load them, its definitely not loading up an older/different copy of VS or anything?

#6 dechorus   Members   -  Reputation: 120

Like
0Likes
Like

Posted 11 February 2011 - 12:57 AM

Yep I've tried that and it works fine. But it is a little tedious copy/pasting all the files over and what have you.

When I double click, it opens up in Visual Studio 2010. I even right clicked the file and made it the default program to open such files.

Opening Visual Studio 2010 first and then opening the project doesn't change anything either. It really is a weird error and I have no idea what's causing it...!

Could it be my installation of XNA, or VS2010? I'm hoping it isn't, VS takes forever to install D:

#7 Andy474   Members   -  Reputation: 683

Like
0Likes
Like

Posted 11 February 2011 - 05:13 AM

Hey guys,

When I download the code provided and open them up, I'm getting very odd errors regarding references. I've attached a screenshot.


Now, I can start new projects in XNA 4.0 and things are fine, but opening up the chapter and lesson source code from this workshop results in this error.

Does anybody have a solution? Much appreciated



ok, easy fix :D

1/ in your project there is a brach called "References" Check to see if you have Microsoft.Xna.Framework.<whatever package it is you get an error on>
2/ if you dont right click on References and "Add Reference" goto the .NET Tab and scroll down until you find it. Add the ones needed to the project and it Should be ok :)

#8 Fl4sh   Banned   -  Reputation: 30

Like
0Likes
Like

Posted 11 February 2011 - 05:12 PM

Just use 3.1 lol. It's what I'm gonna do. :o
They hated on Jeezus, so you think I give a f***?!

#9 Psyentist   Members   -  Reputation: 100

Like
0Likes
Like

Posted 11 February 2011 - 05:47 PM

Just use 3.1 lol. It's what I'm gonna do. :o


Even though the work shop is XNA 4.0? odd man, really odd.
"No challenge in life is insurmountable, one can always learn the answer."

#10 dechorus   Members   -  Reputation: 120

Like
0Likes
Like

Posted 11 February 2011 - 08:12 PM

FIXED! The problem was my version of XNA 4.0, or so I think. In any case, I uninstalled XNA 4.0 and redownloaded the installer and reinstalled it, and problem solved.

I think the version I had was the Beta, or possibly an earlier version. Or perhaps it just needed a reinstall, I'm not sure...! But I'm glad things work now.

I WAS and still am using 3.1, but I really wanted to get on board with 4.0 for this workshop, and since it allows for development for the windows phone.

EDIT: Alright I think I jumped a little too quickly there. After opening Lesson02 the same problem happened again. I was able to fix it however, by adding in the reference.

I'm still a little confused as to why I had to do that. Under my references, the Microsoft.Xna.Framework WAS in fact there, but it had the little exclamation in the yellow triangle icon, as it could not be located or something like that. After manually adding it in though, everything worked once more.

#11 Sammie22   Members   -  Reputation: 102

Like
0Likes
Like

Posted 12 February 2011 - 01:37 AM

EDIT: Alright I think I jumped a little too quickly there. After opening Lesson02 the same problem happened again. I was able to fix it however, by adding in the reference.

I'm still a little confused as to why I had to do that. Under my references, the Microsoft.Xna.Framework WAS in fact there, but it had the little exclamation in the yellow triangle icon, as it could not be located or something like that. After manually adding it in though, everything worked once more.


I've had that happen too. It could be a path issue. Anyway, it's not just you, and it's something to check when you load up projects.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS