This was originally posted on my blog.
If you've ever worked in a large code-base of around a hundred or so projects, then you know that organizin...
For further actions, you may consider blocking this person and/or reporting abuse
I suspect this isn’t actually VSCode’s fault. If I remember correctly a folder is basically a file just a certain type. You can try in terminal and you still have the same problem:
More on the above and maybe a little solution (in bash):
$_in bash is the last parameter given to the previous command.Hi Dan,
Thanks for the reply, I’m sure the mkdir tip will be helpful to someone that hasn’t encountered it before.
It’s worth noting that this is regarding Visual Studio proper as opposed to Visual Studio Code, which in this scenario will make a bit of a difference. Visual Studio has a concept of Solution folders, which are logical and this don’t necessarily map to physical ones on disk.
The issue here was that I already had a project (and project folder) of a specific name, Foo.Logging. As time passed a few other logging specific implementations such as Foo.Logging.Serilog, Foo.Logging.log4net, etc. came along, which for organization purposes I wanted to house in a single, logical solution folder called “Foo.Logging”, and thus the issue arose can which is almost assuredly a Visual Studio tooling issue as opposed one a simple naming conflict.
I hope that makes sense - and thanks again for the read/reply.
AH! I misunderstood that it wasn’t vscode. Haha!
I was curious about your screenshot - so similar but a little different.
Yeah I agree it looks like an issue with the tool then. Is there some place to report it/request a fix? I’ve never used Visual studio
Actually, from what I can see in VS2017 solution files, a Solution Folder is now created IN the .sln file. So, if you add a project of name "TestFolder" - you'll have a project in the .sln of that name. Trying to add in a Solution Folder (which is only a virtual folder in the file system) VS won't let you add a same named project.
This is the SLN contents of a solution with ONLY a Solution Folder in it.
Microsoft Visual Studio Solution File, Format Version 12.00
Visual Studio 15
VisualStudioVersion = 15.0.28307.645
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestFolder", "TestFolder", "{01F7F854-0EC2-47D2-AF62-97CAC80C3294}"
EndProject
Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5E6FC95B-7995-413A-A37A-102F5797AEF0}
EndGlobalSection
EndGlobal
Great find! I had just assumed it was illegal.