Udostępnij za pośrednictwem


Troubleshooting System Diagrams

When you work in System Designer, certain actions affect the system diagram as well as other distributed system diagrams. This topic describes certain conditions that result from these actions, their impact on associated items, and steps you can take to resolve these conditions. The following list describes alert states that can appear on the system diagram as well as other issues that you might need to troubleshoot:

  • Alert States on System Diagrams

  • Opening, Closing, and Removing System Diagrams

  • Modifying System Diagrams While Code is Running

Alert States on System Diagrams

The following table describes alert states that can appear on a system diagram.

Alert state

Possible causes

Red dashed outline on a member

  • The definition of that member is renamed, deleted, or becomes missing while that member's system diagram remains closed.

  • The Culture, Version, or Document Name properties for the definition of a member are changed while that member's system diagram remains closed.

  • For a member that is an application, the project associated with the definition of that application is removed, unloaded, or missing from the solution.

For example, members of application systems and their definitions are linked by name. Visual Studio does not update members of application systems on closed system diagrams if you rename the definition of that member. This action breaks the link between a definition and its uses as members of application systems on closed system diagrams. 

When you reopen these system diagrams, members with broken links (also called "orphaned members") display red dashed outlines. If the definition of an orphaned member was renamed, the previous definition name appears on that member. Otherwise, the current definition name appears on that member. In either case, the definition name appears underlined by a squiggly line.

The following table summarizes the scenarios that can cause this alert state to appear.

Action

Resolution

Rename the definition of a member while that member's system diagram remains closed.

Repair the orphaned member by selecting the renamed definition to associate with that member. For more information, see How to: Repair Orphaned Members in Application Systems.

If you do not want to select a definition, you can restore the definition to its previous name temporarily and then rename the definition while the system diagram is open. For more information, see How to: View Application and System Definitions from System Diagrams and How to: Rename Applications on Application Diagrams.

Delete the definition of a member while that member's system diagram remains closed.

Repair the orphaned member by selecting another definition to associate with that member. For more information, see How to: Repair Orphaned Members in Application Systems.

If you do not want to repair the orphaned member, you can delete that member from system diagrams containing that member. For more information, see How to: Delete Members from Application Systems.

The definition of a member is missing.

Add the missing definition to the solution.

Note

Missing application definitions can include missing application definition (.sdm) files, such as for external Web services, databases, and generic applications. Missing system definitions are missing system diagram (.sd) files.

For example, if the missing definition is a system, add the system diagram back to the solution. For more information, see How to: Add System Diagrams to Solutions.

If you cannot find the missing definition, you can perform one of the following tasks:

Change the Culture, Version, or Document Name properties for the definition of a member while that member's system diagram remains closed.

Repair the orphaned member by selecting the updated definition to associate with that member. For more information, see How to: Repair Orphaned Members in Application Systems.

If you do not want to select a definition, you can restore the definition's property to its previous value temporarily and then update the definition while the system diagram is open. For more information, see How to: View Application and System Definitions from System Diagrams and How to: Rename Applications on Application Diagrams.

Remove or unload the project for an implemented application definition from the solution.

Add the project back to the solution or reload the project.

For more information, see the following topics:

The project for an implemented application definition is no longer available and appears unloaded in your solution.

Remove the unloaded project from the solution and choose another definition for the orphaned member on the system diagram. After you repair the orphaned member, delete the orphaned definition from the application diagram.

For more information, see How to: Repair Orphaned Members in Application Systems.

Add a system diagram from another solution.

For a missing and unimplemented application definition, add a new application of the same type to the application diagram. You can also repair the orphaned member by selecting another definition to associate with that member. For more information, see How to: Repair Orphaned Members in Application Systems.

For a missing and implemented application definitions, add the project for that missing definition to the solution. For more information, see How to: Reverse-Engineer Projects in Existing Solutions. For example, you can implement the applications in the other solution and then add their projects to the current solution. For more information, see How to: Implement Applications on Application Diagrams.

For a missing system definition, add the system diagram for that definition to the current solution. For more information, see How to: Add System Diagrams to Solutions.

Copy a member between system diagrams in different solutions or instances of Visual Studio.

For a missing application definition, copy the definition to the application diagram in the current solution. If the application definition is implemented, add the project for that application. For more information, see How to: Reverse-Engineer Projects in Existing Solutions.

For a missing system (member) definition, add the system diagram defining that system to the current solution. For more information, see How to: Add System Diagrams to Solutions.

Opening, Closing, and Removing System Diagrams

Opening, closing, or removing a system diagram from a solution has the following impact on other diagrams in the solution:

  • Opening a system diagram opens the application diagram and any other system diagrams that are referenced by the opened system diagram.

  • Closing a system diagram requires saving and closing any system and deployment diagrams that reference that system diagram.

    Tip

    To close a system diagram without saving it, first close any related system or deployment diagrams.

  • Before removing a system diagram from the solution, you must close all other open diagrams in the solution.

Modifying System Diagrams While Code is Running

Adding a new system diagram and performing actions on that diagram, such as adding a use of an application definition, while code is running causes Visual Studio to stop responding.

Tip

To avoid this condition, stop code execution before performing actions on the diagram.

See Also

Other Resources

Designing Application Systems on System Diagrams