how can i get the latest version by command line ?

Hi,

I need to get the latest version of my project by command line , i checked the VSS 2005 help i didn't find any real example.

Please can u give me an example (with recursive option)

Thanks,

Tarek Ghazali

SQL Server MVP



Answer this question

how can i get the latest version by command line ?

  • velt

    I have solutions I work on in Visual Studio that contain multiple projects. Each project has its own project entry in VSS separate from the solution VSS entry. Is there a way I can use ss Get on the solution VSS project and have it retrieve all the other projects linked to it without calling ss Get for each individual project

    For example, I have a solution which contains three projects: the UI, base libraries, and base communications libraries. In VSS it'd look like this:

    $/
    - $/Project
    - UI
    - $/Base_Libraries
    - $/Comm_Libraries

    There are plenty of other projects in VSS, so a call to get $/ wouldn't do well here. I tried the following command:

    ss get -r $/Project -GLC:\Project\

    but all I get is Project and UI. I'd like to retrieve $/Base_Libraries and $/Comm_Libraries as they are linked in Visual Studio solution without additional get commands for the Base and Comm libraries in case I add a project later and don't update my batch file. Can this be done

    Thanks for the help.

    Rich


  • Pirringer

    Hi Tarek,

    If you're thinking of getting a VisualStudio project using VSS command line, so you can open it later with the IDE from the local disk, this scenario may or may not work. It is not a scenario recommended or supported by source control team. If your solution has web projects, is is likey your solution will not open or build correctly - web projects require enlistment which can be made only by opening the solution using the VisualStudio UI.

    If you just want to get a VSS project using command line, something like this should work and will get recursive the $/MyProject into C:\MyProject

    set SSDIR=\\alinc00\vss$ (the path to the VSS database)

    mkdir C:\MyProject

    ss.exe Get -R -I- $/MyProject -GLC:\MyProject

    Look at http://msdn2.microsoft.com/en-us/library/661w6e3d(VS.80).aspx and http://msdn2.microsoft.com/en-us/library/hsxzf2az(VS.80).aspx for additional options you can pass to the VSS command line.

    Alin


  • Martin Flores

    Thanks for the info. This is pretty much the answer I thought I'd receive, despite what my hopes would be. Didn't think about using the Share command in VSS to create links to individual projects in the solution's VSS directory. Would that allow me to retrieve one project and get the appropriate sub-directories using both the ss command and VS.NET If not, looks like I'll have to maintain my batch file when I update a solution.

    When I retrieve a solution from within VS.NET using the VSS structure shown above, the solution gets its own folder and each project is copied to that folder. So the base and comm libraries would be duplicated on local disk for each solution I have retrieved. We have some web applications, but most of our development is done for Windows. Currently we are using VSS 2005.

  • chuck620

    Not with this structure in the VSS database, no.

    Depending on how the structure of the projects looks like on the local disk you may be able to either Rebind the projects to different location using ChangeSourceControl dialog or use Share command in VSS (then check bindings with ChangeSourceControl dialog).

    Where are base and common libraries on local disk Are they any web projects in your solution What VS version are you using

    Alin


  • how can i get the latest version by command line ?