Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert project .dsw from VS 6 to VS 2005 from command-line

Status
Not open for further replies.

chrisdq

Programmer
Nov 6, 2002
77
US
Hi,

I was wondering how to compile a .dsw project written in Visual Studio 6 in Visual Studio 2005 from the command-line. The GUI would give me an option to convert but I need to use the command-line in Dos to compile from a script. When I try to use devenv project.dsw /upgrade, it just doesn't work. It prompted me to convert the project first.

Does anyone know how to force it or work around?

Thanks,
Chris.
 
You can't - 2005 uses

.sln instead of .dsw
.vcproj instead of .dsp

It has to convert everything. The .sln and .vcproj files are in XML so your old macros don't even work. Start up the .dsw in 2005, allow it to convert your workspace to solutions and projects to its variant of projects. Then save everything. After that you will be able to run it from the command line with the .sln file.
 
Hi xwb,

Thanks for your valuable info.
Is there a way to automate the process of "start up the .dsw in 2005" then tell it to convert to .sln automatically from a batch script or something?

I just thought that if we can use the GUI to convert .dsw project to .sln, then there must be a way to convert it from the command-line. It might use other tools/apps to convert the old project from GUI but I just don't know about.

Any hints/help would be greatly appreciated.

Thanks again,
Chris.
 
I've never tried looking for one. I normally use the GUI. You could try devenv /?

I can't try it out as I do not have access to Visual Studio at the moment.

 
Try devenv /Upgrade

I've never used it before and I've got no idea what it does.
 
I tried devenv project.dsw /upgrade already but it didn't work. It prompted me to convert the file first. I was looking for another method to convert from .dsw to .sln without using the GUI (for automation purpose). This is where I'm stuck.

Anyone has any idea?

Thanks,
Chris.
 
Sounds like you want to just keep the .dsws and convert them everytime. There is no reason for this unless you wish to go back to 6.0 or just do development in 6.0 but build in 2005. I'd just bite the bullet and convert everything. You're just confusing yourself by switching between environments.

You only need to convert the dsws to slns once. Just manually go through all the dsws and convert them and you are done. Alternatively, write a vbscript which does appropriate sendkeys for you.

You can't have that many dsws to convert. The biggest project I worked on only had 30. Took about 1 hour and that was it: no going back.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top