3

I was looking at the properties information for a C# WPF App is Visual Studio 2017, and noticed that there are many fields that default to the solution name when a new solution is opened. I do not know if this is specific to C#, WPF, or Visual Studio 2017.

I figure the difference between the Solution Name and the Project Name become more reasonable when adding multiple projects to a solution, but I've gotten confused with with some of the other fields. There is this question regarding the Namespace vs Assembly Name, and the answer from Zaheer Ahmed is well written. Namespace or Assembly?

Namespace is a logical grouping of classes belongs to same functionality. So System.Web and System.Data are namespaces

Assembly is chunk of (precompiled) code that can be executed by the .NET runtime environment. It contains one or more than one Namespaces. A .NET program consists of one or more assemblies. System.Web.dll and System.Data.dll are assemblies.

What is the difference between the following?

  • Solution Name
  • Project Name
  • Assembly Name (Project Properties)
  • Default Namespace (Project Properties)
  • Title (Assembly Information)
  • Product (Assembly Information)

Here's the view from Visual Studio 2017. Assembly Information of Project Properties in New Solution

Ped7g
  • 16,236
  • 3
  • 26
  • 63
mjpowers0903
  • 71
  • 2
  • 7
  • 1
    What about [the Assembly Information Dialog documentation](https://learn.microsoft.com/en-us/visualstudio/ide/reference/assembly-information-dialog-box) is unclear? See also [Understanding and Using Assemblies and Namespaces in .NET](https://msdn.microsoft.com/en-us/library/ms973231.aspx) and [Setting Assembly Attributes](https://learn.microsoft.com/en-us/dotnet/framework/app-domains/set-assembly-attributes). – NightOwl888 Mar 16 '18 at 15:05

1 Answers1

3

A solution may contain one or more projects, along with build information, Visual Studio window settings, and any miscellaneous files that aren't associated with any specific project. Please refer to MSDN for more information.

Solutions and Projects in Visual Studio: https://msdn.microsoft.com/en-us/library/b142f8e7.aspx.

So a solution has a name and each project within the solution also has a name.

A project is compiled into an assembly when you build it and by default the name of this assembly is the same as the name of the project. You can change this by giving the assembly another name in the Project->Properties->Assembly name TextBox in Visual Studio.

The default namespace is the namespace that any class that you add to the root folder of the project belong to by default.

Understanding Visual Studio's Default Namespaces: http://www.blackwasp.co.uk/VSNamespaces.aspx

namespace (C# Reference): https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/namespace

And the assembly attributes are simply values that provide information about an assembly: https://learn.microsoft.com/en-us/dotnet/framework/app-domains/set-assembly-attributes. If you for example right-click on an assembly (.dll or .exe) in Window Explorer and choose Properties->Details, you will see these.

mm8
  • 163,881
  • 10
  • 57
  • 88