Sometimes it's Better to Check Even Really Obvious Dialog Defaults

If you only have a C# project file named e.g. "foobar.csproj" in a directory, opening it in the Visual Studio IDE (VS.Net 2003) will create a solution file for you. Either when saving or exiting you'll be asked for the file name, with the default name being e.g. "foobar.sln".

 

After being asked for solution file names over and over again, I never looked at the default name again - I simply hit Ok as soon as the dialog popped up.

 

Tip: You shouldn't do this if your project filename contains a dot. Because for a project named e.g. "foo.bar.csproj", the default name of the automatically generated solution file is "foo.sln", not "foo.bar.sln" as one would expect. For "X.Y.Z.csproj" the default name is "X.Y.sln", for "A.B.C.D.csproj" the default name is "A.B.C.sln", and so on.

In contrast, if you create a new project from scratch, the solution name is the same as the project name, even if the project name contains a dot.

 

No Comments