将VC6的项目转换成VC.Net2003
来源:互联网 发布:和男友逛街知乎 编辑:程序博客网 时间:2024/05/09 15:49
将下面的代码另存为 convert.js
然后在cmd中调用,调用方法类似于: CScript convert.js e:/yourprojects/old.dsp e:/yourprojects/new.vcproj
// when running this at the command line,
// call it with CScript so you don't get UI.
// example: CScript convert.js e:/yourprojects/old.dsp e:/yourprojects/new.vcproj
// NOTE: full path required to both input and output files
// or set default script engine to the command line doing this first
// example: CScript //H:CScript
// Once you set the environment, run the .js file like a .bat file
// To have a batch file loop through all the .dsp files
// in a directory, write a batch file that looked like this
// (Windows NT 4 or Windows 2000 only)
// CScript //H:CScript //Nologo
// for /R %%i in (*.dsp) do convert.js %%i >> ./Convert.log
var vcProj = new ActiveXObject("VisualStudio.VCProjectEngine.7.1");
var objFile = new ActiveXObject("Scripting.FileSystemObject");
var objArgs = WScript.Arguments;
// check the arguments to be sure it's right
if (objArgs.Count() < 2)
{
WScript.Echo("VC6 or 5 DSP Project File Conversion");
WScript.Echo("Opens specified .dsp and converts to VC7.1 Format.");
WScript.Echo("Will create project file with .vcproj extension");
WScript.Echo("/n/tusage: <full path/project.dsp> <full path/project.vcproj>");
WScript.Quit(1);
}
WScript.Echo("/nConverting: "+ objArgs.Item(0));
// If there is a file name of the .vcproj extension, do not convert
var vcProject = vcProj.LoadProject(objArgs.Item(0));
if (!objFile.FileExists(vcProject.ProjectFile))
{
// specify name and location of new project file
vcProject.ProjectFile = objArgs.Item(1);
// call the project engine to save this off.
// when no name is shown, it will create one with the .vcproj name
vcProject.Save();
WScript.Echo("New Project Name: "+vcProject.ProjectFile+"/n");
}
else
{
WScript.Echo("ERROR!: "+vcProject.ProjectFile+" already exists!/n");
}
- 将VC6的项目转换成VC.Net2003
- 将项目从VC6转到VC Express
- 在VC6和VC.NET2003的中MFC程序显示XP风格
- vs.net2003的asp.net项目转换到vs.net2005
- 在VC6.0或者VC.net2003中生成MOC文件
- VS.NET2003项目转换到VS.NET2005项目出现的两个常见问题
- 将VC++6.0项目转换为VS2010项目时遇到的问题与解决方法
- 为什么.NET2003项目转.NET2005项目会转换不成功
- VC6.0 DLL项目与WINDOWS项目的转换
- vc将字符转换成的ASCII数值
- VC6.0 怎样将MFC的单文档程序转换成多文档
- 将VC向导中创建出来的Win32项目和Win32控制台程序互相转换
- 将vs2010项目转换成vs2008项目的方法
- 将Maven项目转换成Eclipse支持的Java项目
- 将Maven项目转换成Eclipse支持的Java项目
- 将Maven项目转换成Eclipse支持的Java项目
- 如何将非ARC的项目转换成ARC项目
- 如何将非ARC的项目转换成ARC项目
- 这个是自己写的一个TreeView绑定控件
- 本人只是一个小虫子
- 《西游记》与《红楼梦》之五行学说(z)
- 鲁棒的数据库持久层设计(白皮书)
- 最简单的设计模式—Singleton
- 将VC6的项目转换成VC.Net2003
- javascript高级程序设计读书笔记(一)
- 一道有问题的小java
- ftp客户端库(C编写,平台Linux,Win)
- 删除临时对象
- ASP常用函数介绍
- 什么是框架?
- 接收二进制码流的服务端基本上做出来了
- .Net平台下开发中文语音应用程序