none
Automated project/build settings checks for Visual-C++?

    Question

  • Hi!

    I've asked the following over at SO: http://stackoverflow.com/questions/7158384/automated-project-build-settings-checks-for-visual-c

    I would like to find out if there exist any tools that do "static analysis" of build settings, specifically of Visual-Studio C++ native project files. (*.vcproj for 2005/2008 - I think 2010 introduces a new filetype unified with MSBuild.)

    (...)

    So basically we have a source repository with lots of projects, and we would like to make sure that all (groups of) projects do have valid build settings and also continue to have valid build settings.

    Are there any tools for this, or are people just rolling their own?

    How do you keep you project-settings / MSBuild-settings consistent when you have lots of developers?

    Would be nice if I could get some input here or on SO. If you know something built for MSBuild only, that would be nice too, as sooner or later we'll switch away from VS2005.

    cheers,
    Martin

     

    Wednesday, August 24, 2011 7:41 AM

All replies

  • Well. I guess the Wikipedia list was worth a look.

    Not a single useful entry however.

    Friday, August 26, 2011 8:20 AM
  • I don't have an answer for you, but it occurs to me that this problem could be tackled using XSLT on the project files.

    Answering policy: see profile.
    Friday, August 26, 2011 9:30 AM
  • Yeah. That's what I meant with "are people just rolling their own" ... :-)
    Friday, August 26, 2011 9:40 AM
  • Create a build acceptance test and run it (automated) before every check-in.

    This ensures that broken project settings are not checked in.

    --pa

     

    Friday, August 26, 2011 11:26 AM
  • Pretty useless IMHO. Obviously, if the settings lead to a broken build we'll notice this sooner or later anyway.

    I want to ensure that the settings are uniform, so that we don't introduce obscure problems down the line.

    Example: New DLL Project does not define Linker optimizations => dll-file is unnecessarily large. (not a big deal, but still.)

    Example: Someone checks optimization setting "omit frame pointers" (/Oy) => Dump Debugging nightmare next time someone hit's a crash in this module.

    You can't test for this stuff, or rather, you probably *could* test that the binaries are correct, but it's a lot easier enforcing uniform settings and trusting the compiler that it heeds its settings. (And, really, sometimes you just have to trust your tool. :-)

    cheers,
    Martin

    Friday, August 26, 2011 11:37 AM
  • If you know and can formulate what to check for, then yes, parse the project xml, run xslt queries on it and so on.

    --pa 

    Friday, August 26, 2011 7:11 PM
  • Hi panqnik,

     

    According to your description, I recommend you post this issue to our Connect feedback portal. Our developer will evaluate them seriously and take them into consideration when designing future release or service pack of the Visual C++. Thanks for your understanding.

     

    Best Regards,

    Rob

     


    Rob Pan [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, September 01, 2011 5:40 AM