-/// var configuration = Props.Get("configuration", "Release");
-///
-///
-/// new DotNetBuild().WithConfiguration(configuration)
-/// .Build().EnsureSuccess();
-///
-///
-/// new DotNetBuildServerShutdown()
-/// .Run().EnsureSuccess();
-///
-///
-/// new DotNetClean()
-/// .WithVerbosity(DotNetVerbosity.Quiet)
-/// .Build().EnsureSuccess();
-///
-/// +/// You specify the path to an application .dll file to run the application. To run the application means to find and execute the entry point, which in the case of console apps is the Main method. For example, dotnet myapp.dll runs the myapp application. +///
+///+/// You specify the path to an application .dll file to run the application. To run the application means to find and execute the entry point, which in the case of console apps is the Main method. For example, dotnet myapp.dll runs the myapp application. +///
+///+/// This command provides a convenient option to add or update a package reference in a project file. When you run the command, there's a compatibility check to ensure the package is compatible with the frameworks in the project. If the check passes and the package isn't referenced in the project file, a <PackageReference> element is added to the project file. If the check passes and the package is already referenced in the project file, the <PackageReference> element is updated to the latest compatible version. After the project file is updated, dotnet restore is run. +///
+///+/// This command provides a convenient option to list all NuGet package references for a specific project or a solution. You first need to build the project in order to have the assets needed for this command to process. +///
+///+/// This command provides a convenient option to remove a NuGet package reference from a project. +///
+///+/// This command provides a convenient option to add project references to a project. After running the command, the <ProjectReference> elements are added to the project file. +///
+///+/// This command provides a convenient option to list project references for a given project. +///
+///+/// This command provides a convenient option to remove project references from a project. +///
+///+/// This command builds the project and its dependencies into a set of binaries. The binaries include the project's code in Intermediate Language (IL) files with a .dll extension. For executable projects targeting versions earlier than .NET Core 3.0, library dependencies from NuGet are typically NOT copied to the output folder. They're resolved from the NuGet global packages folder at run time. With that in mind, the product of dotnet build isn't ready to be transferred to another machine to run. To create a version of the application that can be deployed, you need to publish it (for example, with the dotnet publish command). For more information, see .NET Application Deployment. +///
+///+/// For executable projects targeting .NET Core 3.0 and later, library dependencies are copied to the output folder. This means that if there isn't any other publish-specific logic (such as Web projects have), the build output should be deployable. +///
+///
+/// var configuration = Props.Get("configuration", "Release");
+///
+///
+/// new DotNetBuild().WithConfiguration(configuration)
+/// .Build().EnsureSuccess();
+///
+/// +/// By default, all servers are shut down. +///
+///+/// This command cleans the output of the previous build. It's implemented as an MSBuild target, so the project is evaluated when the command is run. Only the outputs created during the build are cleaned. Both intermediate (obj) and final output (bin) folders are cleaned. +///
+///
+/// This command manages a self-signed certificate to enable HTTPS use in local web app development. Its main functions are:
+///
- Generating a certificate for use with HTTPS endpoints during development.
+///
- Trusting the generated certificate on the local machine.
+///
- Removing the generated certificate from the local machine.
+///
- Exporting a certificate in various formats so that it can be used by other tools.
+///
- Importing an existing certificate generated by the tool into the local machine.
+///
+/// This command creates a .NET project or other artifacts based on a template. The command calls the template engine to create the artifacts on disk based on the specified template and options. +///
+///
+/// new DotNetNew()
+/// .WithTemplateName("console")
+/// .WithName("MyApp")
+/// .WithForce(true)
+/// .Run().EnsureSuccess();
+///
+/// +/// This command lists available templates to use with dotnet new. If the <TEMPLATE_NAME> is specified, lists templates containing the specified name. This option lists only default and installed templates. To find templates in NuGet that you can install locally, use the search command. +///
+///+/// This command searches for templates supported by dotnet new on NuGet.org. When the <TEMPLATE_NAME> is specified, searches for templates containing the specified name. +///
+///+/// This command displays the metadata of the template package from the package name provided. By default, the command searches for the latest available version. If the package is installed locally or is found on the official NuGet website, it also displays the templates that the package contains, otherwise it only displays basic metadata. +///
+///+/// This command installs a template package from the PATH or NUGET_ID provided. If you want to install a specific version or prerelease version of a template package, specify the version in the format <package-name>::<package-version>. By default, dotnet new passes * for the version, which represents the latest stable package version. +///
+///+/// This command uninstalls a template package at the PATH or NUGET_ID provided. When the <PATH|NUGET_ID> value isn't specified, all currently installed template packages and their associated templates are displayed. When specifying NUGET_ID, don't include the version number. +///
+///+/// This command updates installed template packages. The dotnet new update command with --check-only option checks for available updates for installed template packages without applying them. +///
+///+/// This command deletes or unlists a package from the server. For nuget.org, the action is to unlist the package. +///
+///+/// This command clears local NuGet resources in the http-request cache, temporary cache, or machine-wide global packages folder. +///
+///+/// This command lists local NuGet resources in the http-request cache, temporary cache, or machine-wide global packages folder. +///
+///+/// This command pushes a package to the server and publishes it. The push command uses server and credential details found in the system's NuGet config file or chain of config files. NuGet's default configuration is obtained by loading %AppData%\NuGet\NuGet.config (Windows) or $HOME/.nuget/NuGet/NuGet.Config (Linux/macOS), then loading any nuget.config or .nuget\nuget.config starting from the root of drive and ending in the current directory. +///
+///+/// This command adds a new package source to your NuGet configuration files. When adding multiple package sources, be careful not to introduce a dependency confusion vulnerability. +///
+///+/// This command disables an existing source in your NuGet configuration files. +///
+///+/// This command enables an existing source in your NuGet configuration files. +///
+///+/// This command lists all existing sources from your NuGet configuration files. +///
+///+/// This command removes an existing source from your NuGet configuration files. +///
+///+/// This command updates an existing source in your NuGet configuration files. +///
+///+/// This command verifies a signed NuGet package. This command requires a certificate root store that is valid for both code signing and timestamping. Also, this command may not be supported on some combinations of operating system and .NET SDK. +///
+///+/// This option will include all the certificates (with fingerprint and fingerprint algorithm) each signer has. If a certificate has a preceding [U], it means that certificate entry has allowUntrustedRoot set as true. +///
+///+/// This command signs all the packages matching the first argument with a certificate. The certificate with the private key can be obtained from a file or from a certificate installed in a certificate store by providing a subject name or a SHA-1 fingerprint. This command requires a certificate root store that is valid for both code signing and timestamping. Also, this command may not be supported on some combinations of operating system and .NET SDK. +///
+///+/// This command shows the dependency graph for a particular package for a given project or solution. Starting from the .NET 9 SDK, it's possible to pass a NuGet assets file in place of the project file, in order to use the command with projects that can't be restored with the .NET SDK. First, restore the project in Visual Studio, or msbuild.exe. By default the assets file is in the project's obj\ directory, but you can find the location with msbuild.exe path\to\project.proj -getProperty:ProjectAssetsFile. Finally, run dotnet nuget why path\to\project.assets.json SomePackage. +///
+///+/// This command gets the NuGet configuration settings that will be applied from the config section. +///
+///+/// This command sets the values for NuGet configuration settings that will be applied from the config section. +///
+///+/// This command unsets the values for NuGet configuration settings that will be applied from the config section. +///
+///+/// This command lists the paths to all NuGet configuration files that will be applied when invoking NuGet commands in a specific directory. +///
+///+/// The dotnet pack command builds the project and creates NuGet packages. The result of this command is a NuGet package (that is, a .nupkg file). +///
+///+/// NuGet dependencies of the packed project are added to the .nuspec file, so they're properly resolved when the package is installed. If the packed project has references to other projects, the other projects aren't included in the package. Currently, you must have a package per project if you have project-to-project dependencies. +///
+///+/// By default, dotnet pack builds the project first. If you wish to avoid this behavior, pass the --no-build option. This option is often useful in Continuous Integration (CI) build scenarios where you know the code was previously built. +///
+///
+/// new DotNetPack()
+/// .Build().EnsureSuccess();
+///
+/// +/// This command searches for a NuGet package. +///
+///+/// This command compiles the application, reads through its dependencies specified in the project file, and publishes the resulting set of files to a directory. +///
+///
+/// new DotNetPublish().AddProps(("PublishDir", ".publish"))
+/// .Build().EnsureSuccess();
+///
+/// +/// A .NET project typically references external libraries in NuGet packages that provide additional functionality. These external dependencies are referenced in the project file (.csproj or .vbproj). When you run the dotnet restore command, the .NET CLI uses NuGet to look for these dependencies and download them if necessary. It also ensures that all the dependencies required by the project are compatible with each other and that there are no conflicts between them. Once the command is completed, all the dependencies required by the project are available in a local cache and can be used by the .NET CLI to build and run the application. +///
+///+/// Sometimes, it might be inconvenient to run the implicit NuGet restore with these commands. For example, some automated systems, such as build systems, need to call dotnet restore explicitly to control when the restore occurs so that they can control network usage. To prevent the implicit NuGet restore, you can use the --no-restore flag with any of these commands. +///
+///
+/// new DotNetRestore()
+/// .Build().EnsureSuccess();
+///
+/// +/// This command provides a convenient option to run your application from the source code with one command. It's useful for fast iterative development from the command line. The command depends on the dotnet build command to build the code. Any requirements for the build apply to dotnet run as well. +///
+///+/// To run the application, the dotnet run command resolves the dependencies of the application that are outside of the shared runtime from the NuGet cache. Because it uses cached dependencies, it's not recommended to use dotnet run to run applications in production. Instead, create a deployment using the dotnet publish command and deploy the published output. +///
+///
+/// new DotNetNew()
+/// .WithTemplateName("console")
+/// .WithName("MyApp")
+/// .WithForce(true)
+/// .Run().EnsureSuccess();
+///
+///
+/// new DotNetRun().WithWorkingDirectory("MyApp")
+/// .Build().EnsureSuccess();
+///
+/// +/// This command makes it easier to track when new versions of the SDK and Runtimes are available. +///
+///+/// This command stores the specified assemblies in the runtime package store. By default, assemblies are optimized for the target runtime and framework. For more information, see the runtime package store topic. +///
+///+/// This command is used to execute unit tests in a given solution. The dotnet test command builds the solution and runs a test host application for each test project in the solution using VSTest. The test host executes tests in the given project using a test framework, for example: MSTest, NUnit, or xUnit, and reports the success or failure of each test. If all tests are successful, the test runner returns 0 as an exit code; otherwise if any test fails, it returns 1. +///
+///+/// For multi-targeted projects, tests are run for each targeted framework. The test host and the unit test framework are packaged as NuGet packages and are restored as ordinary dependencies for the project. Starting with the .NET 9 SDK, these tests are run in parallel by default. To disable parallel execution, set the TestTfmsInParallel MSBuild property to false. For more information, see Run tests in parallel and the example command line later in this article. +///
+///
+/// new DotNetNew()
+/// .WithTemplateName("mstest")
+/// .WithName("MyTests")
+/// .WithForce(true)
+/// .Run().EnsureSuccess();
+///
+///
+/// new DotNetTest().WithWorkingDirectory("MyTests")
+/// .Build().EnsureSuccess();
+///
+/// +/// This command provides a way for you to install .NET tools on your machine. +///
+///+/// This command provides a way for you to list .NET global, tool-path, or local tools installed on your machine. The command lists the package name, version installed, and the tool command. +///
+///+/// This command finds the tool manifest file that is in scope for the current directory and installs the tools that are listed in it. For information about manifest files, see Install a local tool and Invoke a local tool. +///
+///+/// This command searches tool manifest files that are in scope for the current directory. When it finds a reference to the specified tool, it runs the tool. +///
+///+/// This command provides a way for you to search NuGet for tools that can be used as .NET global, tool-path, or local tools. The command searches the tool names and metadata such as titles, descriptions, and tags. +///
+///+/// This command provides a way for you to uninstall .NET tools from your machine. +///
+///+/// This command provides a way for you to update .NET tools on your machine to the latest stable version of the package. The command uninstalls and reinstalls a tool, effectively updating it. +///
+///"; + const string paraFinish = "
"; + const string exampleStart = "";
+ const string codeFinish = "
";
+
+ string CreateCliRef(string command) =>
+ $"