0

I'm working on a script that generates Visual Studio 2005 C++ project files (.vcproj).

The script reads a makefile, then spits out a c++ project.

INPUT: makefile ---> OUTPUT: VS 2005 c++ project (.vcproj)

However, when I try to build the auto-generated project in VS 2005, error outputs: "Unspecified Error." Evidently, I am not generating the VS 2005 .vcproj file correctly.

Assuming that my c++ project file was malformed, I opened up VS 2005 and made a new C++ project. I actually copied the good, VS 2005-created project file to my non-working, malformed project file. I replaced the Name, Reference Includes (.libs), Compile Includes (.cc, .c), etc. in the good VS 2005 project with my malformed project file's information.

However, I still cannot get VS 2005 to compile my .vcproj. Perhaps VS 2005 is very particular about the content of its .vcproj's?

Please give me advice on how to manually generate a VS 2005 .vcproj.

Thanks!

Kevin Meredith
  • 41,036
  • 63
  • 209
  • 384

1 Answers1

2

The project files are in the MSBuild format, which is a XML file format with a schema (XSD). You can verify your generated files against this schema. Follow the instructions here:

http://blogs.msdn.com/b/msbuild/archive/2005/11/04/489212.aspx

to locate the schema files and then grab your favored tool schema verification tool to validate your tool's output. A discussion about schema validation tools is here:

XML Schema (XSD) validation tool?

Community
  • 1
  • 1
Nordic Mainframe
  • 28,058
  • 10
  • 66
  • 83
  • If I understand correctly, you advise me to check out the schema to determine what makes a good .vcproj? Thanks – Kevin Meredith Feb 06 '11 at 23:35
  • Yes. A schema is basically a grammar definition. It says which element may occur where and which attributes are allowed, optional or mandatory. Schema validation tools check your input against this grammar and tell you what is wrong with your file and where. – Nordic Mainframe Feb 07 '11 at 00:01