Having trouble converting code from 3.1 to 4.0
#1 Members - Reputation: 122
Posted 03 February 2011 - 08:55 AM
Thanks,
Jamison
#2 Moderators - Reputation: 6649
Posted 03 February 2011 - 09:17 AM
#4 Members - Reputation: 118
Posted 10 February 2011 - 11:59 PM
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
#5 Members - Reputation: 122
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 Members - Reputation: 118
Posted 11 February 2011 - 12:57 AM
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 Members - Reputation: 413
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
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
#10 Members - Reputation: 118
Posted 11 February 2011 - 08:12 PM
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 Members - Reputation: 102
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.






