List of available demo projects as example of basic work, features and similar.

Real projects

Some features and scripts you can see on the following latest real projects:

CI.MSBuild.Demo

For work with MSBuild Tool or for work without Visual Studio you have a few ways. And if your choice the CI.MSBuild you also should select how it will be automatically distributed on another machines (where some of this utilities may not exist at all).

The most easy variant it is the non-binary GetNuTool ~8kb. However, you can also use standard NuGet clients and any other tools.

In samples below we'll consider both variant.

Sample 2 (via GetNuTool)

/Sample2 - :: build-9: 9f3658e0

Tested on:

  • CI.MSBuild:
    • v1.6.0.3805 [ 48df3db ]
  • vsSolutionBuildEvent:
    • v0.12.7.3805 [ 48df3db ]

This is a simple example for work with - CI.MSBuild / vsSolutionBuildEvent. You will see next features:

  • Generate the unique label for all project as version of this or similar.
  • Create the archives of binaries from projects:
  • Create the common 'bin' folder if needed and put the following artifacts:
├───bin
│       ClassLibrary1_2016.02.07_12;45;49.1366_[5EAFE1F]_[net45].7z
│       ConsoleApplication1_2016.02.07_12;45;49.1366_[5EAFE1F]_[net45].tar.xz
│       Release_notes.txt
│       Sample2_2016.02.07_12;45;49.1366_[5EAFE1F]_[net45].zip
│

Where:

  • '.7z', '.tar.xz', '.zip' the final archives which is created by SevenZipComponent
  • 'Release_notes.txt' - as a summary of this, for example:
This assembled from:

* Configuration:   'Debug'
* .NET version:     v4.5 (net45);
* MSBuild Tools:    v14.0;
* Label:            2016.02.07_12;45;49.1366_[5EAFE1F];
* Sha1:             5EAFE1FBA3BEDAA59302AB42D7E9210AC4566C6C;

Sample 1 (via official NuGet client)

Note: it is old example for v1.5.0 with only update for using of the latest library v1.6.1207.

Readme

Tested on:

  • CI.MSBuild:
    • v1.6.0.3805 [ 48df3db ]
    • v1.5.0.2692 [ 8bde22a ]
  • vsSolutionBuildEvent:
    • v0.12.7.3805 [ 48df3db ]
    • v0.12.3.2692 [ 8bde22a ]

This is a simple example for work with - CI.MSBuild / vsSolutionBuildEvent. You will see next features:

    ...
    ProjectsMap map = new ProjectsMap(@"$(SolutionPath)");

    string data = @"

        #[( #[Build type] != Clean )
        {{
            #[var firstProject = {0}] #[var lastProject = {1}]
        }}
        else {{
            #[var firstProject = {1}] #[var lastProject = {0}]
        }}]
    ";

    cmd.SBEScript.parse(String.Format(data, map.getFirst().name, map.getLast().name));
   ...

gist

  • and other…

Note: In v0.12.4+ you can use simply #[Build solution.path("app.sln").First.name] etc.

As result you can see, for example:

 - I'm the action in 'Script Mode' for Pre-Rebuild Event :: I started Before Rebuild - 'ClassLibrary2' (btw, StartUp project - 'Sample1').
 - I'm very simple action in 'Interpreter Mode' :: I also started Before - 'ClassLibrary2'. 
 - I'm the action in 'Script Mode' for Post-Rebuild Event :: I started After Rebuild the all projects. I mean after 'ConsoleApplication1'!
 - I only for Build/Rebuild operations and I'm working only if I can't see any errors with your build.

ClientDemo

It shows how to work with client.vssbe.dll features. For external work with events from our core library.

How to use, see here

References