frends-community - Frends.Community.ExecuteProcess 2.0.0

This is template task.

PM> Install-Package Frends.Community.ExecuteProcess -Version 2.0.0 -Source https://www.myget.org/F/frends-community/api/v3/index.json

Copy to clipboard

> nuget.exe install Frends.Community.ExecuteProcess -Version 2.0.0 -Source https://www.myget.org/F/frends-community/api/v3/index.json

Copy to clipboard

> dotnet add package Frends.Community.ExecuteProcess --version 2.0.0 --source https://www.myget.org/F/frends-community/api/v3/index.json

Copy to clipboard
<PackageReference Include="Frends.Community.ExecuteProcess" Version="2.0.0" />
Copy to clipboard
source https://www.myget.org/F/frends-community/api/v3/index.json

nuget Frends.Community.ExecuteProcess  ~> 2.0.0
Copy to clipboard

> choco install Frends.Community.ExecuteProcess --version 2.0.0 --source https://www.myget.org/F/frends-community/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "frends-community" -SourceLocation "https://www.myget.org/F/frends-community/api/v2"
Install-Module -Name "Frends.Community.ExecuteProcess" -RequiredVersion "2.0.0" -Repository "frends-community" 
Copy to clipboard

Frends.Community.ExecuteProcess

FRENDS Community Task for ExecuteProcessCommand

Actions Status MyGet License: MIT

Installing

You can install the task via FRENDS UI Task View or you can find the NuGet package from the following NuGet feed https://www.myget.org/F/frends-community/api/v3/index.json and in Gallery view in MyGet https://www.myget.org/feed/frends-community/package/nuget/Frends.Community.ExecuteProcess

Tasks

ExecuteProcess

Executes a command with parameters. Old task method, which is kept to maintain backward compatibility.

Properties

Property Type Description Example
ScriptPath string Path to script cmd or %windir%\system32\cmd.exe
Arguments array<string,string> Argument name and value /C, echo testi >> c:\test.txt
WaitForResponse bool Wait for process response true
Timeout Seconds int Timeout for process response in full seconds. 10

Returns

Property Type Description Example
Result string Command result when waiting fo result External process execution was successful with output: foobar
Status bool Status of executed command. Always true when returning a result. Returns true if command was started successfully when not waiting for a result. 0

RunProcess

New task method to execute commands with parameters. Has better options to control execution and output.

Properties

Property Type Description Example
FileName string An application or document with which to start a process. Use cmd.exe to execute command on "command line" /bin/bash
Arguments array<string,string> Argument name and value -c,ls

Options

Property Type Description Example
TimeoutSeconds int Timeout in full seconds. 30
KillProcessAfterTimeout bool true if process should be killed after timeout; otherwise, false false
RedirectStandardInput bool true if input should be read from StandardInput; otherwise, false false
ThrowExceptionOnErrorResponse bool true if the task should throw exception when return code is not 0. false

Returns

A result object with parameters

Property Type Description Example
ExitCode int 0
Output string Process' STDOUT output Operation complete.
StdErr string Process' STDERR output Error code: 20

Usage: To fetch result use syntax: #result.ExitCode

Exceptions

Task could throw TimeoutException or ApplicationException.

Building

Clone a copy of the repo

git clone https://github.com/CommunityHiQ/Frends.Community.ExecuteProcess.git

Rebuild the project

dotnet build

Run Tests

dotnet test

Create a NuGet package

dotnet pack --configuration Release

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

Change Log

Version Changes
1.6.0 RunProcess task (Linux compatible) added
1.5.0 Multiplatform version
1.4.0 First version
2.0.0 Targeted to .NET6 and 8 and updated System.ComponentModel.Annotations to 5.0.0.
  • .NETFramework 4.7.1
    • System.ComponentModel.Annotations (>= 5.0.0)
  • .NETFramework 6.0
    • System.ComponentModel.Annotations (>= 5.0.0)
  • .NETFramework 8.0
    • System.ComponentModel.Annotations (>= 5.0.0)
  • .NETStandard 2.0
    • System.ComponentModel.Annotations (>= 5.0.0)
  • .NETFramework 4.7.1: 4.7.1.0
  • .NETFramework 6.0: 6.0.0.0
  • .NETFramework 8.0: 8.0.0.0
  • .NETStandard 2.0: 2.0.0.0

Owners

FRENDS Community Feed User

Authors

HiQ Finland

Project URL

https://github.com/CommunityHiQ/Frends.Community.ExecuteProcess

License

Unknown

Tags

Frends

Info

181 total downloads
29 downloads for version 2.0.0
Download (28.8 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
2.0.0 28.8 KB Mon, 24 Feb 2025 08:27:46 GMT 29
1.6.2 15.14 KB Thu, 16 Apr 2020 09:53:20 GMT 108
1.4.0 6.68 KB Fri, 07 Jun 2019 09:35:03 GMT 44