Under certain conditions, the application diagram might become locked and appear in a read-only state. The diagram will appear shaded, application definitions on the diagram will display padlocks, and changes cannot be made to the diagram. The application diagram becomes locked under the following conditions:
-
A code or class file in the application project does not compile or parse.
The diagram becomes locked and the Error List window lists one or more files that do not compile or parse and the location of those errors in those files.
Tip |
|---|
| To resolve this condition, fix the compile or parse errors in the specified files or undo the changes that caused the compile or parse errors. |
-
Changes to encrypted sections in configuration files were attempted; however, decrypting these sections was unsuccessful.
When configuration file sections are encrypted, these sections must be decrypted in order to edit them. Otherwise, the diagram becomes locked and the Error List window indicates that the diagram is locked.
-
Changes on the application diagram cannot synchronize with other project files that remain checked in under source code control.
The diagram becomes locked and the Error List window indicates that a synchronization error occurred because checkout was cancelled.
For example, this can occur when the .asmx file for a Web service is deleted and the source code control option is set to always check out the working file. To resolve this condition, check out the application definition (.sdm) file from the corresponding project as well as the application diagram (.ad) file, if not checked out. After performing this task, close and reopen the application diagram.
-
The application diagram cannot be checked out for synchronization.
When the application diagram is checked into source code control, the diagram becomes locked when source code control cannot check out the diagram for synchronization. This occurs when source code control settings are set to check out the server version of files, which reloads those files. However, SDM documents do not support reloading during synchronization, therefore, the diagram cannot be checked out and will lock.
Tip |
|---|
| To resolve this condition, close and reopen the diagram, which attempts to synchronize the diagram. To avoid this condition, change your source code control options to always check out the working folder version or check out the file prior to any operation that requires reloading the file. For more information, see System Definition Model (SDM) Documents Under Source Control. |
-
Checkout was cancelled by the user for .sdm files in application projects added to the solution from source code control.
If a solution contains an application diagram (.ad) file, and projects (that were previously generated for applications on the application diagram) are added to the solution from source code control, Visual Studio either checks out the .sdm files in those projects automatically or prompts you to check them out, depending on your source code control settings. If checkout is cancelled for these .sdm files, the diagram becomes locked if it is open or the next time it is opened.
Tip |
|---|
| To resolve this condition, close the diagram, check out the .sdm files manually, and then reopen the diagram. You can also check out the .sdm files when you reopen the diagram. To avoid this condition, do not cancel checkout if you are prompted to check out the .sdm files. For more information, see System Definition Model (SDM) Documents Under Source Control. |
-
Following checkout cancellation by the user for a Windows application project containing a Web reference to a renamed Web service provider endpoint on the application diagram, checkout was cancelled by the user for the App.config and Settings.settings files associated with that Windows project.
When a Web service provider endpoint that is associated with a Web reference in a Windows application project is renamed, Visual Studio either checks out the Windows application project automatically or prompts you to check it out, depending on your source code control settings, so that the Web reference can be updated. For more information, see Overview of ASP.NET Applications on Application Diagrams. If checkout is cancelled for the project, the .asmx file and class file associated with the Web service provider endpoint revert to their previous names. Visual Studio then attempts to check out or prompts you to check out the App.config and Settings.settings files associated with the project. If checkout is cancelled by the user for these files, the application diagram becomes locked if it is open or the next time it is opened.
Tip |
|---|
| To resolve this condition, close the diagram and check out the required files manually before reopening the diagram or when you reopen the diagram. To avoid this condition, do not cancel checkout if you are prompted to check out the App.config and Settings.settings files. When you accept checkout, any uppercase characters in the name of the Web service provider endpoint are changed to lowercase. |
-
Getting the latest version of an SDM document from source code control while the application diagram (.ad) file is open.
Performing this operation requires reloading the application diagram and might cause these files to become unsynchronized. If this operation is performed while the application diagram is open, the application diagram becomes locked. For more information, see System Definition Model (SDM) Documents Under Source Control.
Tip |
|---|
| To resolve this condition, close the diagram and then reopen it. |
-
An application on the application diagram was implemented using a custom template that generated an application definition (.sdm) file.
Such templates are typically created from projects associated with applications on the application diagram. Using these templates creates a conflict between the application definition (.sdm) file generated by the template and the one that Application Designer attempts to create during the implementation process.
Tip |
|---|
| To resolve this condition, close the diagram, delete the .sdm file, and reopen the diagram. |
-
A Web service project with Web Services Enhancement (WSE) settings was reverse-engineered or opened in a solution containing an application diagram when WSE is not installed.
The diagram becomes locked when a Web service project with WSE settings is opened or reverse-engineered in a distributed system solution on a computer that does not have WSE installed.
-
The application diagram or a project was modified while code was running.
The diagram becomes locked when you attempt to modify the application diagram or projects in the solution while code is running, for example, when the Visual Studio Debugger is running. Adding a new distributed system diagram, such as a system diagram, and performing actions on that diagram while code is running causes Visual Studio to stop responding.
Tip |
|---|
| To resolve this condition, stop code execution, for example, by closing the debugger. To avoid this condition, stop code execution before adding a new distributed system diagram or before performing actions on the diagram. |
-
The application diagram or any other System Definition Model (SDM) file was modified outside the designer.
The application diagram becomes locked when changes are made to the application diagram or any other SDM file outside of the corresponding designer.
Tip |
|---|
| To resolve this condition, close and reopen the application diagram. |
-
An attempt to close the solution occurred during a designer operation.
The application diagram becomes locked when an attempt to close the solution was made during a designer operation. For example, this can occur when changes to the solution are automatically retrieved from source code control upon checkout.
Tip |
|---|
| To resolve this condition, close the diagram, and then close and reopen the solution. Synchronize your solution and project files with the latest versions under source code control, and then reopen the diagram. You might be prompted to save your solution before closing; however, saving the solution might require you to manually merge items in your solution in order to synchronize your solution. Merging SDM documents is generally not recommended. For more information, see Concurrent Checkout and Changes to System Definition Model (SDM) Documents. |