You may know the drill – create a GitHub repo, clone it, fire up Visual Studio to create a blank solution.
Unfortunately, Visual Studio does not put the
.sln file into the selected location. Instead, it creates a nested folder with the same name:
VS 2017 had a checkbox that allowed us to specify not to create a folder, but that is missing in the new dialog. So how to work around this?
A simple workaround is to change the Location to a folder above the cloned folder – so instead of
C:\Dev\MyCoolProject\ we use
C:\Dev\. Simple but effective and efficient!
For more flexibility, we can use the .NET Core CLI's
dotnet new command. Launch command line from the cloned folder and type:
This will generate a blank solution file with the same name as the current folder. Furthermore, to give the
.sln a custom name, we can use the