GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - 3F/vsSolutionBuildEvent: 🎛 Event-Catcher with variety of advanced Actions to service projects, libraries, build processes, runtime environment of the Visual Studio, MSBuild Tools, and …

BranchesTags
Open more actions menu

Latest commit

 

History

477 Commits
477 Commits

Folders and files

NameName
Last commit message
Last commit date
.dependabot
.dependabot
 
 
.github
.github
 
 
.tools
.tools
 
 
Bridge
Bridge
 
 
CI.GUI
CI.GUI
 
 
CI.MSBuild.Test
CI.MSBuild.Test
 
 
CI.MSBuild
CI.MSBuild
 
 
CIMLib
CIMLib
 
 
ClientDemo
ClientDemo
 
 
Devenv
Devenv
 
 
E-MSBuild @ 9cd4453
E-MSBuild @ 9cd4453
 
 
LSender @ f4ad519
LSender @ f4ad519
 
 
MvsSln @ a00e3b3
MvsSln @ a00e3b3
 
 
Provider
Provider
 
 
SobaScript @ 2b7ef78
SobaScript @ 2b7ef78
 
 
SobaScript.Mapper @ 682fc98
SobaScript.Mapper @ 682fc98
 
 
SobaScript.Z.Core @ ef80401
SobaScript.Z.Core @ ef80401
 
 
SobaScript.Z.Ext @ c3aa097
SobaScript.Z.Ext @ c3aa097
 
 
SobaScript.Z.VS @ 09bf596
SobaScript.Z.VS @ 09bf596
 
 
Varhead @ 262835a
Varhead @ 262835a
 
 
inc
inc
 
 
media/scr
media/scr
 
 
vsSolutionBuildEvent
vsSolutionBuildEvent
 
 
vsSolutionBuildEventTest
vsSolutionBuildEventTest
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.version
.version
 
 
.vssbe
.vssbe
 
 
3rd-party
3rd-party
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
VsixLib.targets
VsixLib.targets
 
 
appveyor-tests.bat
appveyor-tests.bat
 
 
build-CI.bat
build-CI.bat
 
 
build.bat
build.bat
 
 
changelog.txt
changelog.txt
 
 
com.github.3F.snk
com.github.3F.snk
 
 
com.github.3F.test.snk
com.github.3F.test.snk
 
 
common.props
common.props
 
 
redefine.props
redefine.props
 
 
versions.props
versions.props
 
 
vsSolutionBuildEvent.bat
vsSolutionBuildEvent.bat
 
 
vsSolutionBuildEvent.sln
vsSolutionBuildEvent.sln
 
 

Repository files navigation

vsSolutionBuildEvent

Control everything: Visual Studio, MSBuild Tools, CI, and more …

🎛 Event-Catcher with variety of advanced Actions to service projects, libraries, build processes, runtime environment of the Visual Studio, MSBuild Tools, and …

Copyright (c) 2013-2024  Denis Kuzmin <x-3F@outlook.com> github/3F

「 ❤ 」 LGPLv3 Download Marketplace nuget

Build status - master GetNuTool SobaScript E-MSBuild MvsSln

Build history

Why vsSolutionBuildEvent

Advanced handler of the most events from MS Visual Studio & MSBuild tools. Full control and flexible multi-actions for basic pre/post events and other additional such as:

  • CommandEvent, Errors, Warnings, Cancel-Build, Output-Build, Transmitter, Logging

Ability to handle events for all subprojects at once from the whole solution as an Solution-Events or individually for each separately.

Various modes for everything:

  • Files Mode, Operation Mode, Interpreter Mode, Script Mode, Targets Mode, C# Mode

Supports Advanced MSBuild & SBE-Scripts engine for your awesome ideas.

Provides CI support (TeamCity, AppVeyor, Azure DevOps, ...), Command-Line mode and lot of other features for convenient work with the builds, tests, versioning, IO operations, and so on. See the documentation.

  • SBE-Scripts
  • E-MSBuild
  • Examples - scripts, solutions, syntax etc.,
  • Continuous Integration (CI)
  • Processing modes
  • API

Scheme of vsSolutionBuildEvent projects

Event model

  • Install & Build (Developer Zone)
  • Wiki - read or edit

Advanced MSBuild

Through E-MSBuild engine.

#[$(
    [System.Math]::Exp('$(
        [MSBuild]::Multiply(
            $([System.Math]::Log(10)), 
            4
        ))'
    )
)]
$(n = 0)       $(desc = "Hello ")
$(n += 3.14)   $(desc += "from vsSBE !")
$(n += $(n))   $(p1 = " Platform is $(Platform)")
$(...)
$(...:project) - from selected project in your solution
$$(...) ... $$(...:project)
$(tStart = $([System.DateTime]::Parse("2014/01/01").ToBinary()))
$([System.Guid]::NewGuid())

$([System.TimeSpan]::FromTicks($([MSBuild]::Subtract($(tNow), $(tStart))))
                        .TotalHours.ToString("0"))

$(pdir = $(ProjectDir:project))
$(pdir = $(ProjectDir.Replace('\', '/'):project))

#SobaScript

https://github.com/3F/SobaScript -- Extensible Modular Scripting Programming Language.

#["
    #SobaScript in action
"]

just a regular text between

#[$(v = 1.2.3)]
#[$(log = "$(TMP)/v.txt")]

#[($(Configuration) ~= Deb || true)
{
    #[var tBase     = $([System.DateTime]::Parse('2019/08/01').ToBinary())]
    #[var tNow      = $([System.DateTime]::UtcNow.Ticks)]
    #[var revBuild  = #[$(
        [System.TimeSpan]::FromTicks('$(
            [MSBuild]::Subtract(
            $(tNow), 
            $(tBase))
        )')
        .TotalMinutes
        .ToString('0')
    )]]
    
    #[var v = $(v).$([MSBuild]::Modulo($(revBuild), $([System.Math]::Pow(2, 14))))]
}]

#[var v = $([System.String]::Format("v{0}\r\n\t", $(v)))]

#[try
{ 
    #[File write("#[var log]"):> Example #[var v] Generated by a vsSolutionBuildEvent]
    #[IO scall("notepad", "#[var log]")]
}
catch(err, msg)
{
    $(err) - Type of Exception
    $(msg) - Error Message
}]

#[Box iterate(i = 0; $(loop); i += 1): #[try
{
    ...
}
catch { $(loop = false) }] ]

For example, you can exclude projects from build at runtime:

#[Build projects.find("name").IsBuildable = false]

Capture data from external utilities:

#[var bSha1 = #[IO sout("git", "rev-parse --short HEAD")]]

Do callable actions with arguments:

#[$(shaListDir = $(dbin))] #[$(searchSubDirs = '0')]
#[Core events.Post.item("ShaList").run()]

Work with files and archives:

#[IO copy.file("$(odir)/notes.txt", "$(pDirCIM)bin\\$(cfg)\\", true)]
#[7z pack.files({
            "$(pDirBridge)bin\$(cfg)\Bridge.*.*",
            "CI.MSBuild.dll",
            "CI.MSBuild.pdb",
            "$(pDirCIM)bin\$(cfg)\*.txt"}, "$(odir)CI.MSBuild_v$(numCIM)_[$(branchSha1)][$(netStamp)].zip")]

+DTE-commands, +Access to all MSBuild properties on the fly, +Conditional statements and lot of other components:

#[try
{
    #[Box iterate(i = 0; $(i) < 10; i += 1): 
        ...
    ]
}catch{ }]

#[( #[vsSBE events.Pre.item(1).Enabled] || ($(Configuration) == "Release" && $(sysc)) )
{
    #[Build projects.find("name").IsBuildable = false]
}
else
{
    #[var bSha1 = #[IO sout("git", "rev-parse --short HEAD")]]
    ...
}]

... create new in 5 minutes

Processing modes

https://3F.github.io/web.vsSBE/doc/Modes/

From simple commands to C# or even msbuild targets:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <Target Name="Init">
        <!-- ... -->
    </Target>

    <!--
        Additional properties:
            $(ActionName)
            $(BuildType)
            $(EventType)
            $(SupportMSBuild)
            $(SupportSBEScripts)
            $(SolutionActiveCfg)
            $(StartupProject)
    -->
</Project>

CommandEvent (DTE)

You can also use this to catch all command from VS IDE. Samples:

$(lcGuid = #[DTE events.LastCommand.Guid])
$(lcId   = #[DTE events.LastCommand.Id])

#[($(lcGuid) == "{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}" && $(lcId) == 1627) {
    #[File scall("notepad", "#[var log]", 30)]
}]

Automatic Version Numbering

See our Wizard for automatic code generation or use any custom scripts.

Various environments

You can easily use this with TeamCity, Azure DevOps, AppVeyor, and any other automated environments:

...

Solution-wide Build events

Pre-Build / Post-Build events for all projects at once or individually for each separately: configure what you need.

Stop build on first error

Immediately stop (at the same time) after the first appearance (compared with StopOnFirstBuildError plugin [?])

Wiki

Wiki - Examples, syntax, developer zone, and other ...

Feel free to improve any pages. Click [Edit] button or Start new here.

Screenshots

[. . .]

About

🎛 Event-Catcher with variety of advanced Actions to service projects, libraries, build processes, runtime environment of the Visual Studio, MSBuild Tools, and …

Topics

automationbuildbuild-automationcicompilere-msbuildenvdteeventsgetnutoolmsbuildpluginsbe-scriptsscriptssevenzipsobascripttoolsvisual-studiovsixvssbevssolutionbuildevent

Resources

Readme
License
Activity

Stars

86 stars

Watchers

7 watching

Forks

23 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.