Code Monkey home page Code Monkey logo

vscommandevent's Introduction

vsCommandEvent

Extending Visual Studio on the fly via E-MSBuild, SobaScript, C#, ...

Build status VSIX GetNuTool SobaScript E-MSBuild

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

@ ☕ 」 LGPLv3

Download

Why vsCommandEvent ?

vsCommandEvent was based on vsSolutionBuildEvent engine to continue the mission of providing flexible customization for your environment and its automation.

Yet another advanced handlers of the most events but unlike the first it was focused on advanced manipulations with Visual Studio IDE and its runtime.

Overriding commands

The development environment of any users can be flexibly changed according to your needs in a few steps.

This is possible because vsCommandEvent may override a lot of things from IDE. It also provides flexible actions due to the fact that it was based on vsSolutionBuildEvent.

You can even override the 'Exit' (including [X] and Alt + F4 hotkey) for Visual Studio IDE on the fly depending on some state of the document etc.

A new look at old things

Why not look at some similar solutions from vsSolutionBuildEvent.

Although 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?

Solution-wide Build Events

vsCommandEvent 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.

This is it ~

Description Guid Id in out
Started - Build Solution {5EFC7975-14BC-11CF-9B2B-00AA00573819} 882
Started - Rebuild Solution {5EFC7975-14BC-11CF-9B2B-00AA00573819} 883
Started - Clean Solution {5EFC7975-14BC-11CF-9B2B-00AA00573819} 885

Automatic Version Numbering

Still available versioning as you prefer. Moreover, with the vsCommandEvent you can handle versioning for most operations of Visual Studio. Just try as you need.

Stop build on first error

Disturbs [Warnings] and [Errors] ?! no problem, manage it:

Advanced Actions

vsCommandEvent provides most of the action types from vsSolutionBuildEvent engine:

  • Files Mode, Operation Mode, Interpreter Mode, Script Mode, Targets Mode, C# Mode, and more such as EnvCommand Mode etc.

Supports advanced MSBuild & 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.

A few modes for you:

Targets Mode

You can even work with MSBuild Targets / Tasks and other 'as is' (classic compatible mode).

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

    <Target Name="Init">
        <!-- your awesome code ... -->
    </Target>
    
</Project>

C# Mode

You can also choose this as an preferred action type.

namespace vsCommandEvent
{
    public class CSharpMode
    {
        public static int Init(ICommand cmd, ISolutionEvent evt)
        {
            // your awesome code ...
        }
    }
}

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)")

...

#SobaScript

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

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

#[($(Configuration) ~= Deb || true)
{
    #[var tBase     = $([System.DateTime]::Parse('2015/10/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)))]
#[File write("#[var log]"):> Example #[var v] Generated by vsSolutionBuildEvent]
#[IO scall("notepad", "#[var log]")]

$(n = $([System.Math]::Exp('$([MSBuild]::Multiply($([System.Math]::Log(2)), 16))')))
$(n)

Use our available components or extend everything by creating new.

Wiki

Read or Edit

🖼️

[ . . . ]

vscommandevent's People

Contributors

3f avatar navossoc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vscommandevent's Issues

VisualStudioGallery and uploading vsix - Error Log Reference

How many bugs I should to see again on this week from MS -_-

again ! fully unclear the error message:

If you see this page, it is because an error occurred in the system while trying to process your request. We apologize for the inconvenience. This error has been reported to our team for analysis.

Error Log Reference #701f3f0a-b235-4599-bee7-23e86569bd93

Return to the site homepage. 

and... what I should to do o_O ?

My question here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/5a8a8c9d-b99c-4add-8b45-f176325e115c/
(I don't know where bug tracker for visualstudiogallery.msdn.microsoft.com)

But important note: Do not use the [upload] type anymore (many problems and inconvenience...)
vsSBE project used the [link] type and feels good

vsgallery

Add EnvDTE.Document events support

I want to display a dialog box when a file is open from the solution explorer for editing if the code file contains a TODO comment with a specific WORD/TEXT?

Is this possible?
If yes could you give an example?

I've looked through the Wiki and can't figure out if this can be done.

I think it is trivial task if we'll add the mentioned event support by using current implementation even if it is based on commands.

I mean something like aggregation between various event types. Maybe adapter.

For this way, ideally we should get additional layer between final logic and VS

~

-> command events  \                                 / Subscriber1
      . . .         --> Aggregation -> Unified evens ---> Subscriber2
-> document events /                                 \ Subscriber3

But, of course, without possible re-execution i.e. only commands. Commands are commands, events are events; nothing changes;
But! we don't care since we provide script engine, again these commands, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.