Link to home
Start Free TrialLog in
Avatar of steva
steva

asked on

Converting a Visual C++ 6.0 MFC application to Visual Studio 2010

I have an MFC application that I built with Visual C++ 6.0 and I'd like to build it now with Visual Studio C++ 2010 Express.  When I double click the 6.0 .dsw file Visual Studio 2010 is called and brings up a window:

The project 'C:\Program Files\Microsoft Visual Studio\MyProjects_VS10\dfm\dfm.dsp' must be converted to the current Visual C++ project format. After it has been converted, you will not be able to edit this project in previous versions of Visual Studio.

Convert and open this project?

When I say Yes, it immediately throws the error:

The project file 'C:\Program Files\Microsoft Visual Studio\MyProjects_VS10\dfm\dfm.dsp'  cannot be loaded.

Does anyone know what I might be running into here?

Thanks for any help.
Avatar of rockiroads
rockiroads
Flag of United States of America image

I am not sure if the same rules apply here

With VB.6 in order to use with 2010, you had to first upgrade to 2008 then upgrade to 2010. There was no direct upgrade path to 2010.

I dont know if you can get a hold of VC++ 2008 Express version and try then using that to upgrade to?
Avatar of steva
steva

ASKER

Ugh!  But thanks for that. Let's see if anyone else has some input.
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of steva

ASKER

Thanks rocki,

The problems your links describe in going from vb6 to .NET are just that, going to .NET. But  I don't want to take my C++ to .NET I just want to support the code with a better IDE.  The code should all stay win32.

But the MFC issue is a problem because I'm running VS 2010 Express and Microsoft wants something like $800 for the Pro version.
Ok, I thought using visual studio 2010 would require use of .net as that is the framework it uses. Maybe Im mistaken as I have not tried the C++ IDE on that. (I have 2010 pro though I didnt have to pay for it).
Avatar of steva

ASKER

No, I think you have control over what VS2010 emits.  For new projects, for example you can specify Win32 and generate all winapi code or you can specify CLR and generate .NET.  You'll also get .NET, I think,  if you specify Win32 but use .NET classes, like System::String or System::Xml::XmlTextReader.

By the way, how did you get 2010 Pro for free?
I have MSDN which was given to me.

What if you downloaded a trial of 2010 pro? and try go from there? http://www.microsoft.com/visualstudio/en-us/download
Avatar of steva

ASKER

But a trial will run out and then they'll want $800, which I'll have to pay because all my code will need 2010 Pro to be supported.  

Anyway, thanks for the discussion.  I gave you the points.
thanks

I suggested the trial just so you can see if you can migrate your code successfully or not. Is this code for personal use or company? if its the latter then tell them what they have to do in order to use it.

Was having a look for workarounds. Wasnt sure if using parts of the trial would work with express. Probably not. But did find this. http://www.codeproject.com/KB/MFC/MFCinVisualStudioExpress.aspx Supposedly shows to how compile MFC with express.
Avatar of steva

ASKER

Yes, you're right.  I should probably make sure the trial version does the conversion before putting out the money.  

The code is for a business but it's My business so there's no one to go ask for the money.

The Code Project article on compiling MFC with Express was interesting.  That may be a solution.

Thanks again.
ok m8. good luck with that.

perhaps consider the time it takes to look at your migration issues. would it be quicker if you perhaps rewrote it? maybe dotnet is not an option for you. But then if you got lots of apps/large apps it would probably take way too long.
Avatar of steva

ASKER

The software doesn't need .NET.  It runs fine now without it. The main motivation for going to 2010 is the modern IDE.  The goal is to eventually sell the software and it would be more attractive if it was already on 2010 than making the buyer convert it themselves or find a version of  V6.

I think the solution is to bite a bullet and get the full 2010 version.  2010 seems to have a wizard to convert from V6 but I just couldn't do it here with my Express version because of the MFC.