ShellLibrary 2.0.1
Suggested Alternatives
Additional Details
Sorry ,I upload 2 packages, I will update the new one.
dotnet add package ShellLibrary --version 2.0.1
NuGet\Install-Package ShellLibrary -Version 2.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ShellLibrary" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ShellLibrary --version 2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ShellLibrary, 2.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ShellLibrary as a Cake Addin
#addin nuget:?package=ShellLibrary&version=2.0.1
// Install ShellLibrary as a Cake Tool
#tool nuget:?package=ShellLibrary&version=2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
C# .NET Framework
using ShellLibrary;
namespace CsTest
{
internal class Program
{
static void Main(string[] args)
{
Shell.RunCommand("ipconfig", "2", "false", false, false, false);
Shell.RunCommand("pause");
}
}
}
Visual Basic .NET Framework
Imports ShellLibrary
Module Program
Sub Main()
' 调用 RunCommand 方法运行命令
Shell.RunCommand("ping 127.0.0.1", count:="3", hideWindow:="false", async:=False, useDataflow:=False, showProgress:=False)
Console.ReadLine()
End Sub
End Module
F# .NET Framework
open ShellLibrary
[<EntryPoint>]
let main args =
async {
let command = "dir" // 要执行的命令
let count = "5" // 执行命令的次数
let hideWindow = "false" // 是否隐藏命令行窗口
let async = true // 是否异步执行命令
let useDataflow = false // 是否使用数据流进行异步执行
let showProgress = true // 是否显示命令执行进度条
do! Shell.RunCommand(command, count, hideWindow, async, useDataflow, showProgress) |> Async.AwaitTask
} |> Async.RunSynchronously |> ignore
0 // 返回一个整数结果,表示程序正常结束
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.2
- System.Threading.Tasks.Dataflow (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.0.1 | 96 | 2/14/2024 |