{"id":16974760,"url":"https://github.com/3f/vscommandevent","last_synced_at":"2025-04-12T01:21:17.693Z","repository":{"id":2246058,"uuid":"44534786","full_name":"3F/vsCommandEvent","owner":"3F","description":"Extending Visual Studio on the fly via E-MSBuild, SobaScript, C#, ...","archived":false,"fork":false,"pushed_at":"2022-02-18T18:44:54.000Z","size":5447,"stargazers_count":19,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T21:03:17.213Z","etag":null,"topics":["automation","commands","compiler","e-msbuild","envdte","events","getnutool","sbe-scripts","scripts","sobascript","tools","varhead","visual-studio","visualstudio","vs2019","vs2022","vscommandevent","vsix","vssbe","vssolutionbuildevent"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3F.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["3F.github.io/Donation"]}},"created_at":"2015-10-19T12:59:16.000Z","updated_at":"2024-04-30T16:25:48.000Z","dependencies_parsed_at":"2022-08-06T12:01:30.622Z","dependency_job_id":null,"html_url":"https://github.com/3F/vsCommandEvent","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FvsCommandEvent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FvsCommandEvent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FvsCommandEvent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FvsCommandEvent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3F","download_url":"https://codeload.github.com/3F/vsCommandEvent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501855,"owners_count":21114684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","commands","compiler","e-msbuild","envdte","events","getnutool","sbe-scripts","scripts","sobascript","tools","varhead","visual-studio","visualstudio","vs2019","vs2022","vscommandevent","vsix","vssbe","vssolutionbuildevent"],"created_at":"2024-10-14T01:07:57.070Z","updated_at":"2025-04-12T01:21:17.661Z","avatar_url":"https://github.com/3F.png","language":"C#","readme":"[![](https://raw.githubusercontent.com/3F/vsCommandEvent/master/vsCommandEvent/Resources/Package.png)](https://github.com/3F/vsCommandEvent) [**vsCommandEvent**](https://github.com/3F/vsCommandEvent)\n\nExtending Visual Studio *on the fly* via [E-MSBuild]((https://github.com/3F/E-MSBuild)), [SobaScript]((https://github.com/3F/SobaScript)), C#, ...\n\n[![Build status](https://ci.appveyor.com/api/projects/status/gwmda50hdcu9esws/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/vscommandevent-2jxea/branch/master)\n[![VSIX](https://img.shields.io/badge/dynamic/xml?color=6C2C7C\u0026label=VSIX\u0026query=//text()\u0026url=https://raw.githubusercontent.com/3F/vsCommandEvent/master/.version)](https://visualstudiogallery.msdn.microsoft.com/ad9f19b2-04c0-46fe-9637-9a52ce4ca661/)\n[![GetNuTool](https://img.shields.io/badge/🧩-GetNuTool-93C10B.svg)](https://github.com/3F/GetNuTool)\n[![SobaScript](https://img.shields.io/badge/🧩-SobaScript-8E5733.svg)](https://github.com/3F/SobaScript)\n[![E-MSBuild](https://img.shields.io/badge/🧩-E--MSBuild-C8597A.svg)](https://github.com/3F/E-MSBuild)\n\n```r\nCopyright (c) 2015-2022  Denis Kuzmin \u003cx-3F@outlook.com\u003e github/3F\n```\n\n[ 「 \u003csub\u003e@\u003c/sub\u003e ☕ 」 ](https://3F.github.io/Donation/) [![LGPLv3](https://img.shields.io/badge/license-LGPLv3-008033.svg)](https://github.com/3F/vsCommandEvent/blob/master/LICENSE)\n\n**[Download](https://github.com/3F/vsCommandEvent/releases/latest)**\n\n* Page on [VisualStudio Marketplace](https://visualstudiogallery.msdn.microsoft.com/ad9f19b2-04c0-46fe-9637-9a52ce4ca661/)\n\n## Why vsCommandEvent ?\n\nvsCommandEvent was based on [vsSolutionBuildEvent](https://github.com/3F/vsSolutionBuildEvent) engine to continue the mission of providing flexible customization for your environment and its automation.\n\nYet another advanced handlers of the most events but unlike the first it was focused on advanced manipulations with Visual Studio IDE and its runtime.\n\n![](media/devenv.png)\n\n* **[Examples](https://vsce.r-eg.net/doc/Examples/)** *- scripts, solutions, syntax etc.,*\n* [vsSolutionBuildEvent engine](https://github.com/3F/vsSolutionBuildEvent)\n* [Processing modes](https://vsce.r-eg.net/doc/Modes/)\n    * [Script Mode](https://vsce.r-eg.net/doc/Modes/Script/)\n    * [Targets Mode](https://vsce.r-eg.net/doc/Modes/Targets/)\n    * [C# Mode](https://vsce.r-eg.net/doc/Modes/CSharp/)\n    * [EnvCommand](https://vsce.r-eg.net/doc/Modes/EnvCommand/)\n* [SobaScript](https://github.com/3F/SobaScript)\n* [E-MSBuild](https://github.com/3F/E-MSBuild)\n* [Wiki](https://vsce.r-eg.net/)\n\n### Overriding commands\n\nThe development environment of any users can be flexibly changed according to your needs in a few steps.\n\nThis is possible because vsCommandEvent may override a lot of things from IDE. It also provides [flexible actions](https://vsce.r-eg.net/doc/Modes/) due to the fact that it was based on [vsSolutionBuildEvent](https://github.com/3F/vsSolutionBuildEvent). \n\n![](https://3F.github.io/web.vsCE/doc/Resources/examples/EnvCommand.png)\n\n![](media/gif/AboutVS.gif)\n\nYou can even [override the 'Exit'](https://vsce.r-eg.net/doc/Examples/Overriding/) (including [X] and Alt + F4 hotkey) for Visual Studio IDE on the fly depending on some state of the document etc. \n\n### A new look at old things\n\nWhy not look at some similar solutions from [vsSolutionBuildEvent](https://github.com/3F/vsSolutionBuildEvent).\n\nAlthough it cannot be same as for vsCommandEvent (since it was based on another technologies), let's try to look closer. Can we achieve the same result?\n\n#### Solution-wide Build Events\n\nvsCommandEvent initially may work with commands from VS. Thus, you can catch commands when starting the any Build operations still for the entire solution or individually for each project separately. \n\n[This is it](https://vsce.r-eg.net/doc/Features/Solution-wide/#how-to) ~\n\nDescription | Guid | Id | in | out\n------------|------|----|----|----\nStarted - Build Solution |{5EFC7975-14BC-11CF-9B2B-00AA00573819} | 882 | | \nStarted - Rebuild Solution |{5EFC7975-14BC-11CF-9B2B-00AA00573819} | 883 | | \nStarted - Clean Solution |{5EFC7975-14BC-11CF-9B2B-00AA00573819} | 885 | | \n\n#### Automatic Version Numbering\n\nStill available versioning as you prefer. Moreover, with the vsCommandEvent you can handle versioning for most operations of Visual Studio. [Just try as you need](https://vsce.r-eg.net/doc/Examples/Version%20number/).\n\n![](https://3F.github.io/web.vsCE/doc/Resources/examples/VersionClass.gif)\n\n#### Stop build on first error\n\nDisturbs [Warnings] and [Errors] ?! no problem, [**manage it**](https://vsce.r-eg.net/doc/Examples/Errors.Stop%20build/):\n\n![](https://3F.github.io/web.vsSBE/doc/Resources/examples/stop_build.png)\n\n## Advanced Actions\n\n*vsCommandEvent* provides most of the action types from [vsSolutionBuildEvent](https://marketplace.visualstudio.com/vsgallery/0d1dbfd7-ed8a-40af-ae39-281bfeca2334) engine:\n\n* Files Mode, Operation Mode, Interpreter Mode, Script Mode, Targets Mode, [C# Mode](https://vsce.r-eg.net/doc/Modes/CSharp/), **and more** such as [EnvCommand Mode](https://vsce.r-eg.net/doc/Modes/EnvCommand/) etc.\n\nSupports advanced MSBuild \u0026 SBE-Scripts engine for powerful usage. And lot of other features for the convenience of your work with the build, tests, versioning, IO operations, and so on. See the documentation.\n\nA few [modes](https://vsce.r-eg.net/doc/Modes/) for you:\n\n### Targets Mode\n\nYou can even work with MSBuild [Targets](https://msdn.microsoft.com/en-us/library/vstudio/ms171462.aspx) / [Tasks](https://msdn.microsoft.com/en-us/library/vstudio/ms171466.aspx) and other 'as is' (classic compatible mode).\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cProject ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\"\u003e\n\n    \u003cTarget Name=\"Init\"\u003e\n        \u003c!-- your awesome code ... --\u003e\n    \u003c/Target\u003e\n    \n\u003c/Project\u003e\n```\n\n### C# Mode\n\nYou can also choose this as an preferred [action type](https://vsce.r-eg.net/doc/Modes/CSharp/).\n\n```csharp\nnamespace vsCommandEvent\n{\n    public class CSharpMode\n    {\n        public static int Init(ICommand cmd, ISolutionEvent evt)\n        {\n            // your awesome code ...\n        }\n    }\n}\n```\n\n## Advanced MSBuild\n\nThrough [E-MSBuild](https://github.com/3F/E-MSBuild) engine.\n\n```js\n#[$(\n    [System.Math]::Exp('$(\n        [MSBuild]::Multiply(\n            $([System.Math]::Log(10)), \n            4\n        ))'\n    )\n)]\n```\n\n```js\n$(n = 0)       $(desc = \"Hello \")\n$(n += 3.14)   $(desc += \"from vsSBE !\")\n$(n += $(n))   $(p1 = \" Platform is $(Platform)\")\n```\n...\n\n## #SobaScript ##\n\n[https://github.com/3F/SobaScript](https://github.com/3F/SobaScript) -- Extensible Modular Scripting Programming Language.\n\n```js\n#[\"\n    Basic example\n\"]\n#[var v = 1.2.3]\n#[var log = $(TMP)/v.txt]\n\n#[($(Configuration) ~= Deb || true)\n{\n    #[var tBase     = $([System.DateTime]::Parse('2015/10/01').ToBinary())]\n    #[var tNow      = $([System.DateTime]::UtcNow.Ticks)]\n    #[var revBuild  = #[$(\n                        [System.TimeSpan]::FromTicks('$(\n                            [MSBuild]::Subtract(\n                            $(tNow), \n                            $(tBase))\n                        )')\n                        .TotalMinutes\n                        .ToString('0'))]]\n    \n    #[var v = $(v).$([MSBuild]::Modulo($(revBuild), $([System.Math]::Pow(2, 14))))]\n}]\n\n#[var v = $([System.String]::Format(\"v{0}\\r\\n\\t\", $(v)))]\n#[File write(\"#[var log]\"):\u003e Example #[var v] Generated by vsSolutionBuildEvent]\n#[IO scall(\"notepad\", \"#[var log]\")]\n\n$(n = $([System.Math]::Exp('$([MSBuild]::Multiply($([System.Math]::Log(2)), 16))')))\n$(n)\n```\n\nUse our available components or extend everything by creating [**new**](https://vssbe.r-eg.net/doc/Dev/New%20Component/).\n\n## Wiki\n\n[Read or Edit](https://vsce.r-eg.net/)\n\n## 🖼️\n\n![](https://3F.github.io/web.vsCE/doc/Resources/Screenshots/vsCommandEvent_menu.png)\n\n![](https://3F.github.io/web.vsCE/doc/Resources/Screenshots/main_v1.0.png)\n\n![](https://3F.github.io/web.vsCE/doc/Resources/examples/CommandEvent.gif)\n\n![](https://3F.github.io/web.vsCE/doc/Resources/examples/cmds/live.gif)\n\n**[ [ . . .](https://vsce.r-eg.net/Screenshots/) ]**\n\n","funding_links":["3F.github.io/Donation"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3f%2Fvscommandevent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3f%2Fvscommandevent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3f%2Fvscommandevent/lists"}