Ability to send the custom messages into VS.Output Window -> Buid pane
How can one pass output to the build window? I have pre-build event in interpreter mode. That executes
cmd.exe /C @powershell G:\Workbench\Project1\beforeBuild.ps1 -SolutionDir G:\Workbench\project1
when in output window i select category of build - none of messages from the script are shown.
Comments (9)
-
repo owner -
reporter How about the situation where I want to duplicate that output see it all under output->build?
-
repo owner it's possible, but not implemented in current versions - was not necessary for all...
so, what's the problem you trying solve ?
I can implement the next variants:
- Option to forward the all/specific messages to specific item of the Output panel, e.g.: output->build
- Extend the components of the SBE-Scripts as similar above to forward direct from stdout.
and others.,
However, please more details why it's needed ? :) additional plugin for work with output->build ? or not convenient work with our custom item ?
Please note, you can also use FileComponent for calling external utilities, for example:
#[File sout("ls", "-la")]
use testing tool for samples and see in code completion for details about arguments (in latest version used Dom for inspecting model, this wiki contains older specification - this should be updated later)
-
repo owner - changed title to Duplicate messages into VS.Output Window -> Buid pane
-
assigned issue to
- marked as enhancement
-
repo owner - changed status to open
-
repo owner - changed title to Ability to send the custom messages into VS.Output Window -> Buid pane
- changed component to Log
-
repo owner this feature available with c9ec867 and planned to public release with v0.11
so, how it works, and what available now with c9ec867:
- Firstly, I added new Event type - 'Logging', this event based on internal logging model. Now we can catch all messages and send to any other place - files, services, logs, output window etc.
- I added new properties & methods for OWPComponent (SBE-Scripts core)
for your task, you can use this with easy script, for example:
#[OWP item("Build").write(false): #[OWP log.Message]]
also you can redirect messages for another panes, for example:
#[OWP item("My special").write(true): #[OWP log.Message]]
also, you can get current level of messages with:
#[OWP log.Level]
clear/activate/delete.. all basic operations
and of course with SBE-Scripts and MSBuild core you can use this as you want:
#[( #[OWP log.Level] == INFO ) { #[(#[OWP log.Message] ~= Result of command:) { #[File write("spec.log"): #[OWP log.Message]] }] }]
etc.
Please note:
- for v0.11 this syntax may be changed... please use wiki/Dom after release
- you can try this feature with c9ec867 or if needed i can release debug version for test:
-
- CI for this project is coming soon... v0.11 should provide feetures for this - see related issue
any questions ?
-
repo owner - changed milestone to ⌛ v0.11
-
repo owner - changed status to resolved
this feature is now available with v0.11
see wiki for details
- Log in to comment
if you're searching - how to pass output data as result of your external script/utility (from stdout) into the Output window of Visual Studio:
if you're searching - how to pass output build data from Visual Studio into your external script/utility:
etc.
Thanks for using,