locked
Trying to Automate Visual C++ to Grade Student Projects RRS feed

  • Question

  • I'm a Computer Science instructor at Portland Community College . Student programming work is submitted to me in the form of Visual Studio C++ Console projects.

    I'd like to automate the process of using Visual Studio to rebuild (to check for compiler errors and warnings) and run their projects. I've found out about MSBuild, devenv, and VCBuild. I bought and read Sayed Hashimi's book about MSBuild.

    I'm having trouble, though, figuring out the "run" part of it. When I run their code, I need to get two things:

    • the program output
    • what goes to the Output Window in Visual Studio

    I need the second because I'm using Visual Studio's memory leak detection . I have no idea how to get that output into a file when I run their executable. It's that output that reports the presence or absence of memory leaks.

    I'm hoping that there are maybe some special flags that would cause an executable built in Debug mode to send that Output Window data to stderr, or a file somehow. I found a program called "DebugView" that displays the messages, but not in a way that's going to be useful to me.

    I've spent the better part of a week trying to figure this out, and haven't found what I need.

    If someone could point me to documentation on how the internals of Visual Studio work (i.e. how does VS call my executable, how do I get my executable to run in the "Start Debugging" mode, etc), I'd be most grateful.

    Thanks...

     

    Friday, April 23, 2010 6:10 PM

Answers