Bagikan melalui


Considerations for Reverse-Engineering in Existing Solutions

In Visual Studio Team System Architecture Edition, you can define applications and design application systems in an existing Visual Studio solution by using the Distributed System Designers. You can perform this task by adding an application diagram or system diagram to your solution. When you perform this task, Visual Studio reverse-engineers the solution and adds application definitions to the application diagram for the appropriate projects in the solution. You can then use Application Designer to visualize, define, configure, and implement applications. You can use System Designer to design application systems. For more information, see How to: Add Application Diagrams to Solutions and How to: Add System Diagrams to Solutions.

The following sections describe additional changes you can make that reverse-engineer items in existing solutions. These sections also describe items that do not support reverse-engineering:

  • Reverse-Engineering in Existing Solutions

  • Items Not Supported for Reverse-Engineering

You can also upgrade your solution from an earlier version of Architecture Edition. However, this release does not support Visual J# projects. For more information, see Upgrading Earlier Versions of Architecture Edition.

Reverse-Engineering in Existing Solutions

After you add an application diagram to your solution, Visual Studio reverse-engineers certain changes that you make to your solution or to projects in your solution. The diagram displays these changes while the diagram is open or when you reopen it:

  • Add a project for an application type that the application diagram supports.

    You can reverse-engineer any project for an application type that the application diagram supports. An application definition shape for that project will appear on the application diagram.

    Be aware of the following considerations when you reverse-engineer projects:

    • If you do not have sufficient privileges to access the IIS Metabase, you cannot reverse-engineer ASP.NET Web projects onto the application diagram.

    • The Target Framework property on a reverse-engineered application will appear empty and read-only. You can view and change the target framework version in the project's properties. By default, Visual Studio will set the Target Framework setting on the resulting application to .NET Framework 3.5. Review this setting and update it, if necessary. Be aware of certain considerations if you change this setting. For more information, see How to: Choose the .NET Framework Version for Applications.

    • If you reverse-engineer an Office project, the resulting application's Template property will appear empty and read-only. However, the application's Office Version setting will reflect the version of Office that the project uses. For more information, see How to: Change Project Templates for Applications.

    • The application diagram will lock if Web Services Enhancement (WSE) is not installed, and you reverse-engineer or open a Web service project that is enabled with Web Services Enhancement (WSE) settings within a solution that contains an application diagram.

      To resolve this condition, close the diagram, install WSE, and then reopen the diagram. For more information, see Troubleshooting Application Diagrams.

    For more information, see the following topics:

  • Add a Web service to the project for an ASP.NET application on the application diagram.

    Visual Studio adds a .NET Web Service provider endpoint to the corresponding ASP.NET application definition on the application diagram. Visual Studio also adds an .asmx file and a Web service class file to the project in your solution. For more information, see Overview of ASP.NET Applications on Application Diagrams.

  • Add a Web method to a Web service class file in an ASP.NET application project.

    Visual Studio adds an operation to the corresponding .NET Web Service provider endpoint on the ASP.NET application definition on the application diagram. You can then view or edit the operation in the Web Service Details window.

    For more information, see the following topics:

  • Add, change, or delete Web method, Web service, or WSDL-related attributes or properties in the Web service class file behind a .NET Web Service provider endpoint on an ASP.NET application definition.

    Visual Studio updates the corresponding operation and any appropriate properties in the Web Service Details window. For more information, see How to: Edit Operations for ASP.NET Web Services.

  • Add, edit, or delete entries to application configuration files.

    Visual Studio updates the settings stored in System Definition Model (SDM) documents and in the Settings and Constraints Editor. For more information, see Overview of the System Definition Model (SDM) and Settings and Constraints Editor.

  • Add entries for custom Web service client proxy classes or for class libraries that contain Web references and custom Web service client proxy classes to the configuration file of an application project.

    A custom Web service client proxy class is a proxy class that you manually create and that is not associated with a Web reference in the application project. An application definition displays a Web service consumer endpoint for each Web reference or custom proxy class only when you add the appropriate entries to the application's configuration file.

    Note

    If the appropriate .NET Web Service provider endpoints exist on the application diagram, connections appear between the Web service consumer endpoints and provider endpoints. Otherwise, new external Web services appear and connect to the Web service consumer endpoints.

    For more information, see the following topics:

  • Add a Web reference to an application project in the solution.

    When you add a Web reference to an application's project, Visual Studio connects that application to an existing ASP.NET Web service or to a new or existing external Web service, depending on whether the application diagram supports that type of application and the Web service URL that the Web reference specifies.

    For more information, see the following topics:

  • Add a database connection entry to an application's configuration file.

    For example, you can add a database connection entry to the Web.config file for an ASP.NET application or to the App.config file for a Microsoft Windows or Office application.

    Visual Studio adds a database consumer endpoint to the application on the application diagram. You can connect that consumer endpoint to an existing external database or to a new external database that you add to the diagram. You can view or edit the database connection settings from the database consumer endpoint. For more information, see How to: Configure Connections to External Databases.

Items Not Supported for Reverse-Engineering

Application Designer has limited or no support for reverse-engineering items in the following categories:

  • Application projects

    • Application Designer does not support the design or direct representation of class libraries.

      You can use an ASP.NET Web service as a facade for the functionality that a class library implements. This makes it possible for you to represent the interaction between a class library referenced by an ASP.NET application and applications that support implementation on the application diagram. For more information, see How to: Reference Class Libraries from Applications on Application Diagrams. You can also visualize Web references to Web services and custom Web service client proxy classes in class libraries as Web service consumer endpoints by adding the appropriate entries to the consumer application's configuration file. For more information, see Web References and Custom Web Service Client Proxy Classes in Class Libraries.

    • Application Designer does not support reverse-engineering for Web site projects based on FTP or Microsoft SharePoint. Application Designer supports reverse-engineering only for Web site projects that run on Internet Information Services (IIS) or ASP.NET Development Server.

  • ASP.NET Web services

    • Web service class definitions that are defined inline in .asmx files.

      The Web Service Details window will not display the corresponding operations for the Web methods associated with an ASP.NET Web service if those methods are not fully declared by a single class definition in a separate code file or "code-behind" file. You can still visualize the Web service as a .NET Web Service provider endpoint on an ASP.NET application and connect consumer applications to it. However, the .NET Web Service provider endpoint will appear with a warning (!) icon. For more information, see Troubleshooting Application Diagrams.

      Note

      The code-behind file is a programming language-specific class file that typically exists in the application code folder of the project associated with the ASP.NET application.

    • Web methods that are declared by attributes on the methods of an interface implemented by a Web service class.

      -Or-

      A class extends a base class that defines Web methods.

      In these scenarios, the Web Service Details window shows only those operations that correspond to the Web methods declared in the class that the .asmx file references. Despite the fact that the Web Service Details window does not show all Web service operations, the .NET Web Service provider endpoint will still appear correctly on the ASP.NET application as long as the .asmx file exists in the application project. In addition, connections to the Web service endpoint will also be correctly implemented and configured.

    • Code that defines a Web service containing multiple bindings.

      If a code-behind file defines a Web service that has Web methods with different bindings, the Web Service Details window shows only those operations associated with the first binding.

      Note

      The WebServiceBinding attribute declares bindings at the Web service level. You can set the SoapDocumentMethod or SoapRPCMethod attribute to use these bindings at the Web method level. For more information, visit the MSDN Library online.

    • WSDL files containing multiple WSDL bindings or DISCO files referencing multiple Web services.

      The Distributed System Designers support only WSDL files that contain single WSDL bindings and DISCO files that reference single Web services.

    For more information, see Overview of ASP.NET Applications on Application Diagrams.

  • Active Template Library (ATL) Server.

  • Web Services Enhancements (WSE) SOAP messaging stack.

For more information about these items, visit the MSDN Library online.

See Also

Tasks

How to: Define Applications on Application Diagrams

Walkthrough: Defining Applications on Application Diagrams

Other Resources

Reverse-Engineering in Existing Solutions