Repository navigation
dotnet sln - #1519
dotnet sln#1519
Conversation
|
|
||
| Prints out a short help for the command. | ||
|
|
||
| ## Examples |
There was a problem hiding this comment.
Would be good to have an example of the invocation that assumes the sln file, e.g. dotnet sln add project.csproj or something similar.
|
|
||
| dotnet-sln -- Modify a .NET Core solution file. | ||
|
|
||
| ## Synopsis |
There was a problem hiding this comment.
Synopsis should be different. It should read something like dotnet sln [add] [remove] [list] <argument>.
There was a problem hiding this comment.
@BlackDwarf if we followed a similar pattern we have been using for other commands, this would probably look like this: dotnet sln [<solution_file_path>] [<add|remove|list>] [--help] [<projects>], no?
|
|
||
| List all projects in a solution file. | ||
|
|
||
| ## Arguments |
There was a problem hiding this comment.
Also, the project file. Another note should be that on unix shells (bash) you can use globs.
There was a problem hiding this comment.
So you can add multiple projects using globbing? or just a single path?
There was a problem hiding this comment.
@spboyer I managed to add projects by using one after the other in the command-line like
C:\temp\HelloWorld>dotnet sln add C:\temp\HW2\HW2.csproj c:\temp\hw3\hw3.csproj
There was a problem hiding this comment.
@mairaw the only other way would be to provide a glob, and if the shell expands it (bash does) it will be the same as putting in multiple projects manually.
mairaw
left a comment
There was a problem hiding this comment.
we have to see how we want to present the commands now that they're getting more complex. we used to list everything as options before (such as https://docs.microsoft.com/en-us/dotnet/articles/core/preview3/tools/dotnet-pack). But now each command, have extra commands.
| description: The dotnet-sln command provides a convenient option to add, remove, and list projects in a solution file. | ||
| keywords: dotnet-run, CLI, CLI command, .NET Core | ||
| author: spboyer | ||
| ms.author: spboyer |
There was a problem hiding this comment.
if you want me to be responsible for this topic, you can put my alias as ms.author (mairaw)
|
|
||
| # dotnet-sln (Tooling RC4) | ||
|
|
||
| dotnet-sln -- Modify a .NET Core solution file. |
|
|
||
| dotnet-sln -- Modify a .NET Core solution file. | ||
|
|
||
| ## Synopsis |
There was a problem hiding this comment.
@BlackDwarf if we followed a similar pattern we have been using for other commands, this would probably look like this: dotnet sln [<solution_file_path>] [<add|remove|list>] [--help] [<projects>], no?
|
|
||
| List all projects in a solution file. | ||
|
|
||
| ## Arguments |
There was a problem hiding this comment.
@spboyer I managed to add projects by using one after the other in the command-line like
C:\temp\HelloWorld>dotnet sln add C:\temp\HW2\HW2.csproj c:\temp\hw3\hw3.csproj
|
|
||
| `add` | ||
|
|
||
| Add a project to the solution file. |
There was a problem hiding this comment.
Add -> Adds and similar fixes for the other commands
|
|
||
| ## Examples | ||
|
|
||
| Add a project to a solution. |
|
|
||
| `dotnet sln todo.sln add todo-app/todo-app.csproj` | ||
|
|
||
| Add a project to a solution |
There was a problem hiding this comment.
Add a project to the solution in the current directory, perhaps?
|
|
||
| `dotnet sln add todo-app.csproj` | ||
|
|
||
| Remove a project from a solution. |
|
|
||
| ## Arguments | ||
|
|
||
| Solution file to use. If not specified, the command will search the current directory for one. |
There was a problem hiding this comment.
Might be worth noting that the not specified one only works if you have only solution in the directory. If there's more than one, you're forced to specify the solution file.
| `add <project> <project>` | ||
|
|
||
| Add a project to the solution file. | ||
| Adds a project or multiiple projects to the solution file. |
|
For the synopsis, should we do similar to the git commands that show the different syntaxes? so we'd have one line showing dotnet sln add, another one dotnet sln list, etc. |
|
@mairaw if we are going to do that, which I am ok with. It can get large with something like |
|
I would agree with @mairaw on this. But we need to be consistent across all commands. |
|
@spboyer yeah I know the permutations can get large for some commands. I'm just trying to see the best way to represent all the different options on a clear way. I liked the way git resolved that. and yes, we'd need to be consistent @BlackDwarf. I can open an issue to review that later on. I don't think we ran into this before. |
|
So what is the direction on this PR? A. Make the change like git? |
|
I'd go with option A for this PR. @BlackDwarf? |
|
A and create an issue. |
|
I'll create the issue. |
|
can you make the changes to have the git style commands @spboyer as previously discussed? |
thesmithee
left a comment
There was a problem hiding this comment.
Looks good now modulo one comment I made.
|
|
||
| ```bash | ||
| dotnet sln [<SLN_NAME>] add <project> <project> | ||
| dotnet sln [<SLN_NAME>] add **/** |
There was a problem hiding this comment.
@spboyer I'm curious, did you test this on PowerShell/CMD and does it work?
There was a problem hiding this comment.
the dotnet add <project> <project> interesting find however.
In powershell
dir **\**\*.fsproj
Directory: /Users/shayneboyer/projects/fsharp/FSNEtCore/src/App
Mode LastWriteTime Length Name
---- ------------- ------ ----
------ 2/7/17 1:51 PM 873 App.fsproj
Directory: /Users/shayneboyer/projects/fsharp/FSNEtCore/src/Library
Mode LastWriteTime Length Name
---- ------------- ------ ----
------ 2/7/17 1:52 PM 848 Library.fsprojreturns the correct items, but
PS /Users/shayneboyer/projects/fsharp/FSNEtCore> dotnet sln add **\**\*.fsproj
Project `**\**\*.fsproj` does not exist.Errors out when adding.
There was a problem hiding this comment.
My findings exactly. I'm split. Should we document it and somehow mention it is available only in bash, or ignore it and let bash users figure it out on their own?
There was a problem hiding this comment.
I like the way it is now, documented.
There was a problem hiding this comment.
You know that people are going to try this in CMD and then file that it doesn't work, right? can we at least put in a caveat or something? Note?
There was a problem hiding this comment.
I have it in the commands section
Glob pattern is supported on Unix/Linux based terminals.
Can either remove it from the synopsis
or
add # Unix / Linux based systems to the end of it
There was a problem hiding this comment.
should we add an example with the glob pattern (and the caveat) too?
There was a problem hiding this comment.
@mairaw there is one there in the examples.
|
|
||
| ## Arguments | ||
|
|
||
| Solution file to use. If not specified, the command will search the current directory for one. If there are multiple solution files in the directory; one must be specified. |
There was a problem hiding this comment.
should we say here that this relates to SLN_NAME? Otherwise, international customers might not know what SLN_NAME refers to when reading the localized version. Such as
SLN_NAME - Solution file to use...
|
|
||
| `add **/*` | ||
|
|
||
| Adds a project or multiple projects to the solution file. Glob pattern is supported on Unix/Linux based terminals. |
There was a problem hiding this comment.
i'll remove "based" to read more clearly
|
|
||
| ## Synopsis | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
we're not using language identifiers for the synopsis block
|
|
||
| ```bash | ||
| dotnet sln [<SLN_NAME>] add <project> <project> | ||
| dotnet sln [<SLN_NAME>] add **/** |
There was a problem hiding this comment.
should we add an example with the glob pattern (and the caveat) too?
|
Also, the topic should be added to the TOC with the other RC4 tools. |
| --- | ||
| # Name | ||
|
|
||
| ## dotnet-sln (Tooling RC4) |
There was a problem hiding this comment.
This should be the H1 of the article (the Tooling RC4 can go away since it's the only version). And then the following line should be added after the H1 header:
[!INCLUDE[preview-warning](../../../includes/warning.md)]
There was a problem hiding this comment.
But it's only available in RC4. Shouldn't that be called out with that?
There was a problem hiding this comment.
updated to
# dotnet-sln
[!INCLUDE[preview-warning](../../../includes/warning.md)]
dotnet-sln -- Modifies a .NET Core solution file.
| ms.devlang: dotnet | ||
| ms.assetid: e5a72d3e-c14b-4b0a-a978-c5e54a0988c6 | ||
| --- | ||
| # Name |
There was a problem hiding this comment.
This should be the first H2
dotnet-sln
Summary
new document for RC3/4 to address dotnet-sln
Fixes #1448
@mairaw @BlackDwarf