II: Default Project Files


II: Default Project Files

When you create a new VB project in Visual Studio .NET, you ll notice numerous files and references added by default, creating a starting point for your application.

Translating these additions back to the real world can often be a confusing task. Therefore, the following sections detail the most-common project types and related template settings.

Windows Application

When creating a Windows application, the following visible items are automatically added to your project:

  • AssemblyInfo.vb : Used to describe your assembly plus contains versioning information. Edit this file to alter such data.

  • Form1.vb : Standard Windows form, ready for you to manipulate.

  • Default references to :

    • System : The mother of the .NET Framework base classes. Includes commonly used value and reference data types, plus defines events and event handlers, interfaces, attributes, and processing exceptions.

    • System.Data : Contains classes to handle ADO.NET data access.

    • System.Drawing : Contains classes to handle GDI+ graphics functionality.

    • System.Windows.Forms : Contains classes for creating Windows-based form applications.

    • System.Xml : Contains classes that provide standards-based support for processing XML.

  • Default namespace imports (Project, Imports) :

    • Microsoft.VisualBasic

    • System

    • System.Collections

    • System.Data

    • System.Diagnostics

    • System.Drawing

    • System.Windows.Forms

Class Library

When creating a class library, the following visible items are automatically added to your project:

  • AssemblyInfo.vb : Used to describe your assembly, plus contains versioning information. Edit this file to alter such data.

  • Class1.vb : Standard class template, ready for you to manipulate.

  • Default references to :

    • System : The mother of the .NET Framework base classes. Includes commonly used value and reference data types, plus defines events and event handlers, interfaces, attributes and processing exceptions.

    • System.Data : Contains classes to handle ADO.NET data access.

    • System.Xml : Contains classes that provide standards-based support for processing XML.

  • Default namespace imports (Project, Imports) :

    • Microsoft.VisualBasic

    • System

    • System.Collections

    • System.Data

    • System.Diagnostics

Web Application

When creating a Web Application, the following visible items are automatically added to your project:

  • AssemblyInfo.vb : Used to describe your assembly, plus contains versioning information. Edit this file to alter such data.

  • Global.asax : Contains template code for responding to application-level events raised by ASP.NET, such as Application_Start.

  • Styles.css : Empty CSS file, used to set page styles.

  • Web.config : Contains your ASP.NET application settings, such as authentication and session settings.

  • <ProjectName>. vsdisco : XML-based file used by ASP.NET when dynamically discovering Web services on the server, only required if you add a Web Service to your application.

  • WebForm1.aspx : Blank Web Form, ready for you to manipulate.

  • WebForm1.aspx.vb : Underneath WebForm1.aspx in the Solution Explorer hierarchy (click on Show All Files to open directly), this file contains a class file for the default WebForm1.aspx page, containing system generated and user code.

  • Default References to :

    • System : The mother of the .NET Framework base classes. Includes commonly used value and reference data types, plus defines events and event handlers, interfaces, attributes, and processing exceptions.

    • System.Data : Contains classes to handle ADO.NET data access.

    • System.Drawing : Contains classes to handle GDI+ graphics functionality.

    • System.Web : Contains classes for browser/server communication.

    • System.Xml : Contains classes that provide standards-based support for processing XML.

  • Default namespace imports (Project, Imports) :

    • Microsoft.VisualBasic

    • System

    • System.Collections

    • System.Configuration

    • System.Data

    • System.Drawing

    • System.Web

    • System.Web.UI

    • System.Web.UI.HtmlControls

    • System.Web.UI.WebControls

Web Service

When creating a Web service, the following visible items are automatically added to your project:

  • AssemblyInfo.vb : Used to describe your assembly, plus contains versioning information. Edit this file to alter such data.

  • Global.asax : Contains template code for responding to application-level events raised by ASP.NET, such as Application_Start.

  • Web.config : Contains your ASP.NET application settings, such as authentication and session settings.

  • <ProjectName>.vsdisco : XML-based file used by ASP.NET when dynamically discovering Web services on the server."

  • Service1.asmx : The actual Web service file, which references the underlying assembly (your code compiled into a DLL).

  • Service1.asmx.vb : Underneath service1.asmx in the Solution Explorer hierarchy (click on Show All Files to open directly), this file contains a class file for the default Web service page, holding system-generated and user code.

  • Default References to:

    • System : The mother of the .NET Framework base classes. Includes commonly used value and reference data types, plus defines events and event handlers, interfaces, attributes and processing exceptions.

    • System.Data : Contains classes to handle ADO.NET data access.

    • System.Web.Services : Contains classes enabling you to build and consume XML Web services.

    • System.Web : Contains classes for browser/server communication.

    • System.Xml : Contains classes that provide standards-based support for processing XML.

  • Default namespace imports (Project, Imports) :

    • Microsoft.VisualBasic

    • System

    • System.Collections

    • System.Configuration

    • System.Data

    • System.Drawing

    • System.Web

    • System.Web.UI

    • System.Web.UI.HtmlControls

    • System.Web.UI.WebControls




The Ultimate VB .NET and ASP.NET Code Book
The Ultimate VB .NET and ASP.NET Code Book
ISBN: 1590591062
EAN: 2147483647
Year: 2003
Pages: 76
Authors: Karl Moore

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net