dotnet-installer/src/dotnet/commands/dotnet-add/Program.cs

42 lines
1.3 KiB
C#
Raw Normal View History

2016-11-15 15:42:15 -08:00
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Cli.Utils;
using System;
using System.IO;
using System.Linq;
using Microsoft.Build.Construction;
using Microsoft.DotNet.ProjectJsonMigration;
using NuGet.Frameworks;
2016-11-15 16:41:29 -08:00
using Microsoft.DotNet.Tools.Add.ProjectToProjectReference;
2016-11-15 15:42:15 -08:00
namespace Microsoft.DotNet.Tools.Add
{
public class AddCommand : DispatchCommand
2016-11-15 15:42:15 -08:00
{
protected override string HelpText => @".NET Add Command
2016-11-22 14:41:56 -08:00
Usage: dotnet add [options] <object> <command> [[--] <arg>...]]
Options:
-h|--help Show help information
2016-11-15 15:42:15 -08:00
Arguments:
<object> The object of the operation. If a project file is not specified, it defaults to the current directory.
<command> Command to be executed on <object>.
Args:
2016-11-22 14:41:56 -08:00
Any extra arguments passed to the command. Use `dotnet add <command> --help` to get help about these arguments.
2016-11-15 15:42:15 -08:00
Commands:
p2p Add project to project (p2p) reference to a project";
2016-11-15 15:42:15 -08:00
protected override Dictionary<string, Func<string[], int>> BuiltInCommands => new Dictionary<string, Func<string[], int>>
2016-11-15 15:42:15 -08:00
{
2016-11-15 16:41:29 -08:00
["p2p"] = AddProjectToProjectReferenceCommand.Run,
2016-11-15 15:42:15 -08:00
};
}
}