Programming Tutorials

Assemblies, Solutions and Projects in VB .NET

By: Steven Holzner in VB.net Tutorials on 2008-11-25  

Assemblies

You combine assemblies to form .NET applications, and although we won't deal with them directly very often, we need to get the terminology down. An assembly holds the Intermediate Language modules for your application. When you create an application in VB .NET and run it, VB .NET creates one or more assemblies, which are run by the CLR. That is, assemblies are how your applications interact with the .NET framework instead of the EXE or DLL files of VB6.

Here's what's in a .NET assembly: first is the manifest-similar to a table of contents-giving the name and version of the assembly. The manifest also lists the other assemblies needed to support this one, and explains how to handle security issues. The actual meat of the assembly is made up of modules, which are internal files of IL code, ready to run. That's how VB .NET stores the IL it creates, in modules inside assemblies. Each module, in turn, contains types-the classes and interfaces that your code has defined, and that the assembly has to know about to let the various modules interact with each other.

We won't deal with assemblies directly much, because all that's needed happens behind the scenes with the CLR and the .NET framework-but we do have to know the terminology, because you'll hear these terms frequently when using VB .NET. For example, to set the version of a Visual Basic project, you edit its AssemblyInfo.vb file in the Visual Basic IDE.

Solutions and Projects

When you created applications in Visual Basic 6.0, you created projects. Each project held the code and data for an application, ActiveX control, or whatever else you wanted to build. If you wanted to combine projects together, you created a project group. In VB .NET, however, project groups have become far more integral to the development process, and now they're called solutions.

By default, when you create a new project in VB .NET, Visual Basic will create a new solution first, and then add a project to that solution.  If we were to add new projects to the current solution (which you can do with the New Project dialog box), those new projects would appear in the Solution Explorer as part of the current solution. This is a change from VB6, where you created projects by default, not project groups. It's also worth noting that Microsoft calls the files in each project, such as the files for a form, items. So the terminology here is that solutions contain projects, and these in turn contain items.






Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in VB.net )

Latest Articles (in VB.net)