References, Web Site Property Pages Dialog Box

The References property page allows you to add and manage references to assemblies, components, and Web services that you want to use in your Web application. When you add a reference, your code can invoke the class, component, or Web service.

Note

Only references you add are shown; implicit references configured in the Machine.config file are not shown.

When you add a reference to an assembly from the global assembly cache, Microsoft Visual Web Developer creates an entry in the Assemblies element of the site's Web.config file. If you add a reference to an assembly from another project, the assembly is copied to the \Bin folder of your Web project and updated as needed by Visual Web Developer.

When you add a Web reference, Visual Web Developer creates a proxy class in your Web site that represents the Web service. The Web service's .wsdl, .xsd and .disco (discovery) files are stored in the App_WebReferences folders. In addition, Visual Web Developer creates an entry in the Web.config file's <appSettings> element referencing the Web service.

To access this dialog box

  1. In Visual Web Developer, in the Solution Explorer pane, click your Web site project name.

  2. Click View and then click Property Pages.

    Alternatively, you can right-click your Web site project name in Solution Explorer and click Property Pages.

    The Property Pages window appears.

  3. Click the References node.

Tasks

UI Elements

  • Add Reference
    Displays the Add Reference dialog box, which allows you to select a .NET type, COM object, or other Microsoft Visual Studio project to reference in your Web site.

  • Add Web Reference
    Displays the Add Web Reference dialog box, which guides you through the process of finding a Web service and creating a proxy class in your Web site to refer to the Web service.

  • Remove
    Removes the currently selected reference from your Web site by removing it from the Web.config file. This command does not affect the original class, component, or Web service.

    Note

    Removing a reference will not remove dependencies on that reference.

  • Update
    Updates a Web reference by recreating the proxy class that represents the Web service. You typically select this option if the service has exposed new methods since you originally created the Web reference.

    Note

    Assembly references are updated automatically, so this command is not active for assembly references.

See Also

Other Resources

Referencing Additional Components in Web Sites

Using ASP.NET Web Services

XML Web Service Description