question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet sln add shouldn't create redundant solution folder

See original GitHub issue

Repro Given file layout

Test.sln
src/
    Microsoft.AspNetCore/
         Microsoft.AspNetCore.csproj

dotnet sln add src/Microsoft.AspNetCore/Microsoft.AspNetCore.csproj

Expected Create a solution with this structure:

src/ (solution folder)
    Microsoft.AspNetCore.csproj

Actual Created a solution with this structure:

src/ (solution folder)
    Microsoft.AspNetCore/ (solution folder)
      Microsoft.AspNetCore.csproj

Using 1.0.0-preview5-004478

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
natemcmastercommented, Jan 13, 2017

Right. along with dotnet/sdk#7508, you end up with this: image

But i would have expected this:

image

0reactions
jgoshicommented, Jan 18, 2017

I’m going to do two things:

  1. Don’t create a new solution folder every folder in the hierarchy that already exists as solution folder. This is issue dotnet/sdk#7508
  2. Do not create a solution folder for the folder containing the project.
Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet sln command - .NET CLI
The dotnet-sln command provides a convenient option to add, remove, and list projects in a solution file.
Read more >
dotnet sln add should allow non-project files to be added ...
In my company we often have a small number of files at the solution level for each solution. These include, for example:.
Read more >
.NET Core: How to create solution folders from the ...
I like to put my test projects into a solution folder. However, the command dotnet sln add seems somewhat restricted. Its argument list...
Read more >
Add All Projects to Solution with dotnet CLI | Blog
If you need to just create a new solution file with all projects in all subfolders in it, this should work for you....
Read more >
How to Create a new Solution and Projects using dotnet CLI
Console dotnet sln add src/Sample.Console/Sample.Console.csproj. The first step creates a new, empty solution. By default it will have the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found