You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CSharpInteractive.HostApi/DotNetCommands.cs
+148-5Lines changed: 148 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -170,7 +170,7 @@ public IStartInfo GetStartInfo(IHost host)
170
170
/// <param name="Project">The project or solution file to operate on. If not specified, the command searches the current directory for one. If more than one solution or project is found, an error is thrown.</param>
171
171
/// <param name="PackageName">The package reference to add.</param>
172
172
/// <param name="Framework">Adds a package reference only when targeting a specific framework.</param>
173
-
/// <param name="NoRestore">Adds a package reference without performing a restore preview and compatibility check.</param>
173
+
/// <param name="NoRestore">Doesn't execute an implicit restore when running the command.</param>
174
174
/// <param name="PackageDirectory">The directory where to restore the packages. The default package restore location is %userprofile%\.nuget\packages on Windows and ~/.nuget/packages on macOS and Linux.</param>
175
175
/// <param name="Prerelease">Allows prerelease packages to be installed. Available since .NET Core 5 SDK.</param>
176
176
/// <param name="Version">Version of the package</param>
@@ -615,6 +615,7 @@ public IStartInfo GetStartInfo(IHost host)
615
615
/// </summary>
616
616
/// <param name="Args">Specifies the set of command line arguments to use when starting the tool.</param>
617
617
/// <param name="Vars">Specifies the set of environment variables that apply to this process and its child processes.</param>
618
+
/// <param name="Props">MSBuild options for setting properties.</param>
618
619
/// <param name="Sources">The URI of the NuGet package source to use during the restore operation.</param>
619
620
/// <param name="ExecutablePath">Overrides the tool executable path.</param>
620
621
/// <param name="WorkingDirectory">Specifies the working directory for the tool to be started.</param>
@@ -627,7 +628,7 @@ public IStartInfo GetStartInfo(IHost host)
627
628
/// <param name="Force">Forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is the same as deleting the project.assets.json file.</param>
628
629
/// <param name="NoDependencies">When restoring a project with project-to-project (P2P) references, restores the root project and not the references.</param>
629
630
/// <param name="NoIncremental">Marks the build as unsafe for incremental build. This flag turns off incremental compilation and forces a clean rebuild of the project's dependency graph.</param>
630
-
/// <param name="NoRestore">Adds a package reference without performing a restore preview and compatibility check.</param>
631
+
/// <param name="NoRestore">Doesn't execute an implicit restore when running the command.</param>
631
632
/// <param name="NoLogo">Doesn't display the startup banner or the copyright message.</param>
632
633
/// <param name="NoSelfContained">Publishes the application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run the application. Available since .NET 6 SDK.</param>
633
634
/// <param name="Output">Directory in which to place the built binaries. If not specified, the default path is ./bin/<configuration>/<framework>/. For projects with multiple target frameworks (via the TargetFrameworks property), you also need to define --framework when you specify this option.</param>
@@ -644,6 +645,7 @@ public IStartInfo GetStartInfo(IHost host)
644
645
publicpartialrecordDotNetBuild(
645
646
IEnumerable<string>Args,
646
647
IEnumerable<(stringname,stringvalue)>Vars,
648
+
IEnumerable<(stringname,stringvalue)>Props,
647
649
IEnumerable<string>Sources,
648
650
stringProject="",
649
651
stringArch="",
@@ -675,15 +677,15 @@ public partial record DotNetBuild(
675
677
/// </summary>
676
678
/// <param name="args">Specifies the set of command line arguments to use when starting the tool.</param>
677
679
publicDotNetBuild(paramsstring[]args)
678
-
:this(args,[],[])
680
+
:this(args,[],[],[])
679
681
{
680
682
}
681
683
682
684
/// <summary>
683
685
/// Create a new instance of the command.
684
686
/// </summary>
685
687
publicDotNetBuild()
686
-
:this([],[],[])
688
+
:this([],[],[],[])
687
689
{
688
690
}
689
691
@@ -721,6 +723,7 @@ public IStartInfo GetStartInfo(IHost host)
721
723
("--use-current-runtime",UseCurrentRuntime),
722
724
("--diagnostics",Diagnostics)
723
725
)
726
+
.AddProps("--property",Props.ToArray())
724
727
.AddArgs(Args.ToArray());
725
728
}
726
729
@@ -3251,6 +3254,143 @@ public IStartInfo GetStartInfo(IHost host)
/// 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).
3261
+
/// </p>
3262
+
/// <p>
3263
+
/// 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.
3264
+
/// </p>
3265
+
/// <p>
3266
+
/// 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.
/// <param name="Args">Specifies the set of command line arguments to use when starting the tool.</param>
3277
+
/// <param name="Vars">Specifies the set of environment variables that apply to this process and its child processes.</param>
3278
+
/// <param name="Props">MSBuild options for setting properties.</param>
3279
+
/// <param name="Sources">The URI of the NuGet package source to use during the restore operation.</param>
3280
+
/// <param name="ExecutablePath">Overrides the tool executable path.</param>
3281
+
/// <param name="WorkingDirectory">Specifies the working directory for the tool to be started.</param>
3282
+
/// <param name="Project">The project or solution to pack. It's either a path to a csproj, vbproj, or fsproj file, or to a solution file or directory. If not specified, the command searches the current directory for a project or solution file.</param>
3283
+
/// <param name="ArtifactsPath">All build output files from the executed command will go in subfolders under the specified path, separated by project.</param>
3284
+
/// <param name="Configuration">Defines the build configuration. The default for most projects is Debug, but you can override the build configuration settings in your project.</param>
3285
+
/// <param name="Force">Forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is the same as deleting the project.assets.json file.</param>
3286
+
/// <param name="IncludeSource">Includes the debug symbols NuGet packages in addition to the regular NuGet packages in the output directory. The sources files are included in the src folder within the symbols package.</param>
3287
+
/// <param name="IncludeSymbols">Includes the debug symbols NuGet packages in addition to the regular NuGet packages in the output directory.</param>
3288
+
/// <param name="NoBuild">Doesn't build the project before packing. It also implicitly sets the --no-restore flag.</param>
3289
+
/// <param name="NoDependencies">When restoring a project with project-to-project (P2P) references, restores the root project and not the references.</param>
3290
+
/// <param name="NoIncremental">Marks the build as unsafe for incremental build. This flag turns off incremental compilation and forces a clean rebuild of the project's dependency graph.</param>
3291
+
/// <param name="NoRestore">Doesn't execute an implicit restore when running the command.</param>
3292
+
/// <param name="NoLogo">Doesn't display the startup banner or the copyright message.</param>
3293
+
/// <param name="NoSelfContained">Publishes the application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run the application. Available since .NET 6 SDK.</param>
3294
+
/// <param name="Output">Directory in which to place the built binaries. If not specified, the default path is ./bin/<configuration>/<framework>/. For projects with multiple target frameworks (via the TargetFrameworks property), you also need to define --framework when you specify this option.</param>
3295
+
/// <param name="OS">Specifies the target operating system (OS). This is a shorthand syntax for setting the Runtime Identifier (RID), where the provided value is combined with the default RID. For example, on a win-x64 machine, specifying --os linux sets the RID to linux-x64. If you use this option, don't use the -r|--runtime option. Available since .NET 6.</param>
3296
+
/// <param name="Runtime">Specifies the target runtime to restore packages for. For a list of Runtime Identifiers (RIDs), see the RID catalog. -r short option available since .NET Core 3.0 SDK.</param>
3297
+
/// <param name="SelfContained">Publishes the .NET runtime with the application so the runtime doesn't need to be installed on the target machine. The default is true if a runtime identifier is specified. Available since .NET 6.</param>
3298
+
/// <param name="TerminalLogger">Specifies whether the terminal logger should be used for the build output.</param>
3299
+
/// <param name="Verbosity">Sets the verbosity level of the command. Allowed values are <see cref="DotNetVerbosity.Quiet"/>, <see cref="DotNetVerbosity.Minimal"/>, <see cref="DotNetVerbosity.Normal"/>, <see cref="DotNetVerbosity.Detailed"/>, and <see cref="DotNetVerbosity.Diagnostic"/>. The default is <see cref="DotNetVerbosity.Minimal"/>. For more information, see <see cref="DotNetVerbosity"/>.</param>
3300
+
/// <param name="UseCurrentRuntime">Sets the RuntimeIdentifier to a platform portable RuntimeIdentifier based on the one of your machine. This happens implicitly with properties that require a RuntimeIdentifier, such as SelfContained, PublishAot, PublishSelfContained, PublishSingleFile, and PublishReadyToRun. If the property is set to false, that implicit resolution will no longer occur.</param>
3301
+
/// <param name="VersionSuffix">Sets the value of the $(VersionSuffix) property to use when building the project. This only works if the $(Version) property isn't set. Then, $(Version) is set to the $(VersionPrefix) combined with the $(VersionSuffix), separated by a dash.</param>
/// Runs source code without any explicit compile or launch commands.
3256
3396
/// <p>
@@ -3285,7 +3425,8 @@ public IStartInfo GetStartInfo(IHost host)
3285
3425
/// <param name="NoBuild">Doesn't build the project before running. It also implicit sets the --no-restore flag.</param>
3286
3426
/// <param name="NoDependencies">When restoring a project with project-to-project (P2P) references, restores the root project and not the references.</param>
3287
3427
/// <param name="NoLaunchProfile">Doesn't try to use launchSettings.json to configure the application.</param>
3288
-
/// <param name="NoRestore">Adds a package reference without performing a restore preview and compatibility check.</param>
3428
+
/// <param name="NoRestore">Doesn't execute an implicit restore when running the command.</param>
3429
+
/// <param name="NoLogo">Doesn't display the startup banner or the copyright message.</param>
3289
3430
/// <param name="OS">Specifies the target operating system (OS). This is a shorthand syntax for setting the Runtime Identifier (RID), where the provided value is combined with the default RID. For example, on a win-x64 machine, specifying --os linux sets the RID to linux-x64. If you use this option, don't use the -r|--runtime option. Available since .NET 6.</param>
3290
3431
/// <param name="Runtime">Specifies the target runtime to restore packages for. For a list of Runtime Identifiers (RIDs), see the RID catalog. -r short option available since .NET Core 3.0 SDK.</param>
3291
3432
/// <param name="TerminalLogger">Specifies whether the terminal logger should be used for the build output.</param>
@@ -3307,6 +3448,7 @@ public partial record DotNetRun(
3307
3448
bool?NoDependencies=default,
3308
3449
bool?NoLaunchProfile=default,
3309
3450
bool?NoRestore=default,
3451
+
bool?NoLogo=default,
3310
3452
stringOS="",
3311
3453
stringRuntime="",
3312
3454
DotNetTerminalLogger?TerminalLogger=default,
@@ -3357,6 +3499,7 @@ public IStartInfo GetStartInfo(IHost host)
0 commit comments