locked
Module Versioning RRS feed

  • Question

  • I have an application build on Visual Studio 2005 CF2.0 for windows CE. I have in this application some PInvoke calls to external C++ *.dll(2 vcproj). My solution have around 12 projects. I want to do an automated versioning of the application according to the SVN revision number, so i'm using MSBuildCommunityTasks.

    To use this on VC# projects i have no problems, everything works ok, but when i'm trying to do that on C++ projects i'm not able to do that. 

    Can anyone help me how to automate the versioning of the CPP dll's of my application.

    Tx in advance !

    • Moved by Yi Feng Li Thursday, July 29, 2010 7:54 AM MSbuild issue (From:Visual C++ General)
    Tuesday, July 27, 2010 1:38 PM

Answers

  • Beginning with VS2010, it's be possible to use MSBuild also in VC++ projects not only in C# or VB.
    • Marked as answer by fant20 Monday, September 13, 2010 6:03 AM
    Monday, September 13, 2010 6:02 AM

All replies

  • Hello,

    As far as I know, you can use MSBuild Community Tasks to change C#/VB.NET assembly version, but you can't use it to change VC assmebly version. To change version information of VC project, please refer to:

    How to increment version information after each build in Visual C++ http://support.microsoft.com/kb/237870

    Please let me know if you have any comments.

    Best Regards,
    Nancy


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, July 29, 2010 10:24 AM
  • This scenario only works on a build from VS.

    If you use DEVENV from the command line or Team-Build it doesn't work.

    Only good solution is to use a PreBuild Event with a specific tool that updates the specific file. Also you can include code that uses a command to checkout the specific file.

    I use a modified tool based upon:
    http://www.codeproject.com/KB/applications/rcstamp.aspx


    Martin Richter -- MVP for VC++ [Germany] -- http://blog.m-ri.de
    Thursday, July 29, 2010 12:35 PM
  • Martin, Your solution is clear, but from some reason i cannot use "rc" files. It tell's me that it cannot be found. 

     

    Thursday, July 29, 2010 2:11 PM
  • Nancy, The solution that you described is for VC++ up to version 6, but i use VC++ 8 for .Net 2005. 

    And one more problem is the usage of the .RC file, because i cannot use that file in my projects, it tells that some header file cannot be found. 

    Thursday, July 29, 2010 2:16 PM
  • Beginning with VS2010, it's be possible to use MSBuild also in VC++ projects not only in C# or VB.
    • Marked as answer by fant20 Monday, September 13, 2010 6:03 AM
    Monday, September 13, 2010 6:02 AM