diff --git a/docs/extensibility/installing-the-visual-studio-sdk.md b/docs/extensibility/installing-the-visual-studio-sdk.md index 77a25dafad6..f51b0034af2 100644 --- a/docs/extensibility/installing-the-visual-studio-sdk.md +++ b/docs/extensibility/installing-the-visual-studio-sdk.md @@ -22,10 +22,13 @@ To install the Visual Studio SDK after completing your Visual Studio installatio ## Install the Visual Studio SDK from a solution -If you open a solution with an extensibility project without first installing the VSSDK, you'll be prompted by an **Install Missing Feature** dialog to install the **Visual Studio extension development** workload: +::: moniker range="visualstudio" +If you open a solution with an extensibility project without first installing the VSSDK, the relevant packages will be installed. +::: moniker-end +::: moniker range="vs-2022" +If you open a solution with an extensibility project without first installing the VSSDK, you'll be prompted by an **Install Missing Feature** dialog to install the **Visual Studio extension development** workload: -::: moniker range=">=vs-2022" :::image type="content" source="media/vs-2022/install-extension-development.png" alt-text="Screenshot showing the Visual Studio dialog to Install extension development workload."::: ::: moniker-end diff --git a/docs/ide/filtered-solutions.md b/docs/ide/filtered-solutions.md index 9416b9cb35d..7d4814dbbde 100644 --- a/docs/ide/filtered-solutions.md +++ b/docs/ide/filtered-solutions.md @@ -1,7 +1,7 @@ --- title: Get faster load & run times with solution filters description: Explore the solution filtering feature in Visual Studio and discover how it allows you to quickly load a subset of projects in a solution. -ms.date: 04/22/2019 +ms.date: 04/24/2026 ms.topic: how-to helpviewer_keywords: - "filtered solution" @@ -37,17 +37,17 @@ To open a solution without loading any of its projects by using the **Open Proje 1. Choose **File** > **Open** > **Project/Solution** from the menu bar. -2. In the **Open Project** dialog, select the solution, and then select **Do not load projects**. +2. In the **Open Project/Solution** dialog, select the solution, and then select **Do not load projects**. - ![Visual Studio Open Project dialog with do not load projects checked](media/filtered-solutions/do-not-load-projects.png) + ![Screenshot of the Visual Studio Open Project dialog with Do not load projects selected.](media/visualstudio/do-not-load-projects.png) 3. Choose **Open**. The solution opens with all of its projects unloaded. -4. In **Solution Explorer**, select the projects you want to load (press **Ctrl** while clicking to select more than one project), and then right-click on the project and choose **Reload Project**. +4. In **Solution Explorer**, select the projects you want to load (press **Ctrl** while clicking to select more than one project), and then right-click the projects and select **Reload Project**. - ![Reload multiple projects in Visual Studio Solution Explorer](media/filtered-solutions/reload-project.png) + ![Screenshot of the Reload Project option.](media/visualstudio/reload-project.png) Visual Studio will remember which projects are loaded the next time you open the solution locally. @@ -69,13 +69,13 @@ You can choose to see either all the projects in the solution or just the loaded - Select the solution node to enable the **Show All Files** button; then, click the button to toggle the visibility of unloaded projects. - ![Show All Files button in Visual Studio Solution Explorer](media/filtered-solutions/show-all-files.PNG) + ![Screenshot of the Show All Files button in Visual Studio Solution Explorer.](media/visualstudio/show-all-files.png) ## Load project dependencies -In a solution where only selected projects are loaded, you may not have all of a project's project dependencies loaded. Use the **Load project dependencies** menu option to ensure that any projects that a project depends on are also loaded. Right-click on one or more loaded projects in **Solution Explorer** and choose **Load project dependencies**. +In a solution where only selected projects are loaded, you may not have all of a project's project dependencies loaded. Use the load project dependencies menu options to ensure that any projects that a project depends on are also loaded. Right-click one or more loaded projects in **Solution Explorer** and select either **Load Direct Dependencies** or **Load Entire Dependency Tree**. -![Load project dependencies in Visual Studio 2019](media/filtered-solutions/load-project-dependencies.png) +![Screenshot of the load project dependencies options.](media/visualstudio/load-project-dependencies.png) ## Solution filter files @@ -83,22 +83,22 @@ If you want to share your project-load configuration or commit it to source cont Solution filter files are visually differentiated from regular solution files by the additional funnel glyph in the icon next to the solution in **Solution Explorer**. The name of the filter and the number of loaded projects are also shown next to the solution name. -![Solution filter file open in Visual Studio Solution Explorer](media/filtered-solutions/solution-filter.PNG) +![Screenshot of a solution filter file open in Visual Studio Solution Explorer.](media/visualstudio/solution-filter.png) > [!NOTE] > If new projects are added to the original solution after you create the solution filter file, they appear as unloaded projects in **Solution Explorer**. ### Create a solution filter file -1. In **Solution Explorer**, right-click on the solution and select **Save As Solution Filter**. +1. On the **File** menu, select **Save Solution As Filter**. - ![Save As Solution Filter menu in Visual Studio Solution Explorer](media/filtered-solutions/save-as-solution-filter.png) + ![Screenshot of the Save Solution As Filter option.](media/visualstudio/save-as-solution-filter.png) 2. Choose a name and location for the solution filter file. -After you create a solution filter file, it's added to your **Recent Projects and Solutions** list for easy access: +After you create a solution filter file, it's added to your recent projects and solutions list for easy access: -![Open recent in Visual Studio](media/filtered-solutions/open-recent.png) +![Screenshot of the Open recent list in Visual Studio.](media/visualstudio/open-recent.png) ## Related content diff --git a/docs/ide/media/visualstudio/do-not-load-projects.png b/docs/ide/media/visualstudio/do-not-load-projects.png new file mode 100644 index 00000000000..4630eb3d9ef Binary files /dev/null and b/docs/ide/media/visualstudio/do-not-load-projects.png differ diff --git a/docs/ide/media/visualstudio/load-project-dependencies.png b/docs/ide/media/visualstudio/load-project-dependencies.png new file mode 100644 index 00000000000..129a30a73c0 Binary files /dev/null and b/docs/ide/media/visualstudio/load-project-dependencies.png differ diff --git a/docs/ide/media/visualstudio/open-recent.png b/docs/ide/media/visualstudio/open-recent.png new file mode 100644 index 00000000000..72ea96d3a01 Binary files /dev/null and b/docs/ide/media/visualstudio/open-recent.png differ diff --git a/docs/ide/media/visualstudio/reload-project.png b/docs/ide/media/visualstudio/reload-project.png new file mode 100644 index 00000000000..75728639832 Binary files /dev/null and b/docs/ide/media/visualstudio/reload-project.png differ diff --git a/docs/ide/media/visualstudio/save-as-solution-filter.png b/docs/ide/media/visualstudio/save-as-solution-filter.png new file mode 100644 index 00000000000..4394a72d637 Binary files /dev/null and b/docs/ide/media/visualstudio/save-as-solution-filter.png differ diff --git a/docs/ide/media/visualstudio/show-all-files.png b/docs/ide/media/visualstudio/show-all-files.png new file mode 100644 index 00000000000..aa72b446ff9 Binary files /dev/null and b/docs/ide/media/visualstudio/show-all-files.png differ diff --git a/docs/ide/media/visualstudio/solution-filter.png b/docs/ide/media/visualstudio/solution-filter.png new file mode 100644 index 00000000000..f6bf562b0ba Binary files /dev/null and b/docs/ide/media/visualstudio/solution-filter.png differ diff --git a/docs/modeling/create-layer-diagrams-from-your-code.md b/docs/modeling/create-layer-diagrams-from-your-code.md index c1d6d16519b..d4086aebb24 100644 --- a/docs/modeling/create-layer-diagrams-from-your-code.md +++ b/docs/modeling/create-layer-diagrams-from-your-code.md @@ -1,7 +1,7 @@ --- title: Create dependency diagrams from your code description: Create a dependency diagram from your code in Visual Studio to visualize your software system's high-level, logical architecture. -ms.date: 01/12/2022 +ms.date: 04/16/2026 ms.topic: how-to helpviewer_keywords: - architecture, dependency diagrams @@ -39,22 +39,9 @@ Before you create a dependency diagram, ensure that your solution has a modeling > [!NOTE] > Dependency diagrams for .NET Core projects are supported starting Visual Studio 2019 version 16.2. -1. On the **Architecture** menu, choose **New Dependency Diagram**. +1. Right-click your modeling project in Solution Explorer and select **Add** > **New Item**. -2. Under **Templates**, choose **dependency diagram**. - -3. Name the diagram. - -4. In **Add to Modeling Project**, browse to and select an existing modeling project in your solution. - - -or- - - Choose **Create a new modeling project** to add a new modeling project to the solution. - - > [!NOTE] - > The dependency diagram must exist inside a modeling project. However, you can link it to items anywhere in the solution. - -5. Make sure to save both, the modeling project and the dependency diagram. +1. In the **Add New Item** window, select **Dependency Validation Diagram**, enter a name for the diagram at the bottom of the window, and then select **Add**. ## Drag and drop, or copy and paste, from a Code Map @@ -64,7 +51,7 @@ Before you create a dependency diagram, ensure that your solution has a modeling 3. On the generated Code Map, remove the "External" node, or expand it to show external assemblies, depending on whether you want to enforce namespace dependencies. Delete non-required assemblies from the Code Map. -4. Create a new Dependency Diagram for the solution using the **Architecture** menu. +4. Add a **Dependency Validation Diagram** item to the Dependency Validation project in your solution. 5. Select all the nodes on the Code Map (use *Ctrl* + *A*, or use the rubber band selection by pressing the *Shift* key before you click, drag, and release). @@ -72,7 +59,7 @@ Before you create a dependency diagram, ensure that your solution has a modeling 7. This shows the current app architecture. Decide what you want the architecture to be and modify the dependency diagram accordingly. -![Dependency diagram generated from a Code Map](media/dependency-validation-01.png) +:::image type="content" source="media/visualstudio/dependency-validation-01.png" alt-text="Screenshot that shows a dependency diagram generated from a Code Map." lightbox="media/visualstudio/dependency-validation-01.png"::: ## Create layers from artifacts You can create layers from Visual Studio solution items, such as projects, code files, namespaces, classes, and methods. This automatically creates links between layers and items, including them in the layer validation process. diff --git a/docs/modeling/media/visualstudio/dependency-validation-01.png b/docs/modeling/media/visualstudio/dependency-validation-01.png new file mode 100644 index 00000000000..bc415b0987c Binary files /dev/null and b/docs/modeling/media/visualstudio/dependency-validation-01.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-add-multiline-statement.png b/docs/python/media/visualstudio/tutor-python-3-add-multiline-statement.png new file mode 100644 index 00000000000..3cc80b462f8 Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-add-multiline-statement.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-add-statements-expressions.png b/docs/python/media/visualstudio/tutor-python-3-add-statements-expressions.png new file mode 100644 index 00000000000..37747b0c5f2 Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-add-statements-expressions.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-copy-paste-code.png b/docs/python/media/visualstudio/tutor-python-3-copy-paste-code.png new file mode 100644 index 00000000000..eeb6619c47b Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-copy-paste-code.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-copy-save-code.png b/docs/python/media/visualstudio/tutor-python-3-copy-save-code.png new file mode 100644 index 00000000000..83c36f35bcf Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-copy-save-code.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-open-interactive-window.png b/docs/python/media/visualstudio/tutor-python-3-open-interactive-window.png new file mode 100644 index 00000000000..059e6a2bab7 Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-open-interactive-window.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-resize-interactive-window.png b/docs/python/media/visualstudio/tutor-python-3-resize-interactive-window.png new file mode 100644 index 00000000000..12ea6067512 Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-resize-interactive-window.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-run-statement-again.png b/docs/python/media/visualstudio/tutor-python-3-run-statement-again.png new file mode 100644 index 00000000000..eb2346de882 Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-run-statement-again.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-select-environment-interpreter.png b/docs/python/media/visualstudio/tutor-python-3-select-environment-interpreter.png new file mode 100644 index 00000000000..72f086b45af Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-select-environment-interpreter.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-send-function-test.png b/docs/python/media/visualstudio/tutor-python-3-send-function-test.png new file mode 100644 index 00000000000..50b8bea8e0d Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-send-function-test.png differ diff --git a/docs/python/media/visualstudio/tutor-python-3-send-statements.png b/docs/python/media/visualstudio/tutor-python-3-send-statements.png new file mode 100644 index 00000000000..a17eb274501 Binary files /dev/null and b/docs/python/media/visualstudio/tutor-python-3-send-statements.png differ diff --git a/docs/python/tutorial-working-with-python-in-visual-studio-step-03-interactive-repl.md b/docs/python/tutorial-working-with-python-in-visual-studio-step-03-interactive-repl.md index 277e5346acc..c9eea0c732f 100644 --- a/docs/python/tutorial-working-with-python-in-visual-studio-step-03-interactive-repl.md +++ b/docs/python/tutorial-working-with-python-in-visual-studio-step-03-interactive-repl.md @@ -2,7 +2,7 @@ title: "Tutorial Step 3: Use interactive REPL" titleSuffix: "" description: Explore step 3 of a tutorial about Python capabilities in Visual Studio that demonstrates how to work with the Python Interactive REPL window. -ms.date: 07/29/2025 +ms.date: 04/27/2026 ms.topic: tutorial author: Devdiv-VR ms.author: vedhar @@ -46,28 +46,58 @@ Follow these steps to open the **Interactive Window** and start working with cod Visual Studio opens the **Interactive Window** for Python under the editor window. The window has the standard **>>>** Python REPL prompt: + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-open-interactive-window.png" alt-text="Screenshot that shows the Interactive Window for Python open underneath the code editor in Visual Studio." lightbox="media/visualstudio/tutor-python-3-open-interactive-window.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-open-interactive-window.png" alt-text="Screenshot that shows the Interactive Window for Python open underneath the code editor in Visual Studio." lightbox="media/tutor-python-3-open-interactive-window.png"::: + :::moniker-end 1. In the **Interactive Window**, you can use the **Environment** dropdown list to select a specific Python interpreter to work with: + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-select-environment-interpreter.png" alt-text="Screenshot that shows how to select the Python interpreter from the Environment dropdown list in the Interactive Window in Visual Studio." lightbox="media/visualstudio/tutor-python-3-select-environment-interpreter.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-select-environment-interpreter.png" alt-text="Screenshot that shows how to select the Python interpreter from the Environment dropdown list in the Interactive Window in Visual Studio." lightbox="media/tutor-python-3-select-environment-interpreter.png"::: + :::moniker-end 1. You can make the **Interactive Window** larger by moving the separator between the window and the code editor: + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-resize-interactive-window.png" alt-text="Screenshot that shows how to move the separator to increase the size of the Interactive Window in Visual Studio." lightbox="media/visualstudio/tutor-python-3-resize-interactive-window.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-resize-interactive-window.png" alt-text="Screenshot that shows how to move the separator to increase the size of the Interactive Window in Visual Studio." lightbox="media/tutor-python-3-resize-interactive-window.png"::: + :::moniker-end > [!TIP] > You can resize any window in Visual Studio by moving the separators between the window and surrounding windows. You can also move windows out of the Visual Studio frame, and rearrange windows within the frame. 1. In the **Interactive Window**, enter a statement like `print("Hello, Visual Studio")` and a calculation expression like `123/456`. Visual Studio displays immediate results for your code: + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-add-statements-expressions.png" alt-text="Screenshot that shows how the Interactive Window displays immediate results for code you enter in Visual Studio." lightbox="media/visualstudio/tutor-python-3-add-statements-expressions.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-add-statements-expressions.png" alt-text="Screenshot that shows how the Interactive Window displays immediate results for code you enter in Visual Studio." lightbox="media/tutor-python-3-add-statements-expressions.png"::: + :::moniker-end 1. Next, enter a multiline statement like the function definition shown in the following example. As you enter the code, the **Interactive Window** shows the Python continuation prompt (**...** ). Unlike the command-line REPL experience, the **Interactive Window** provides automatic indentation as you enter code: + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-add-multiline-statement.png" alt-text="Screenshot that shows how the Interactive Window displays the Python continuation prompt for multiline code statements in Visual Studio." lightbox="media/visualstudio/tutor-python-3-add-multiline-statement.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-add-multiline-statement.png" alt-text="Screenshot that shows the Interactive Window displays the Python continuation prompt for multiline code statements in Visual Studio." lightbox="media/tutor-python-3-add-multiline-statement.png"::: + :::moniker-end To add a new line in your code, select **Shift**+**Enter**. @@ -93,7 +123,13 @@ Try these features by completing the following steps: 1. Right-click the `import` statement in the file and select **Send to Interactive** (or the keyboard shortcut **Ctrl**+**E**). Repeat this process for the `from` statement. + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-send-statements.png" alt-text="Screenshot that shows how to send code for the import and from statements to the Interactive Window in Visual Studio." lightbox="media/visualstudio/tutor-python-3-send-statements.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-send-statements.png" alt-text="Screenshot that shows how to send code for the import and from statements to the Interactive Window in Visual Studio." lightbox="media/tutor-python-3-send-statements.png"::: + :::moniker-end When you select the **Send to Interactive** command, the selected code fragment is immediately pasted into the **Interactive Window** and run. In this case, Visual Studio imports the `cos` and `radians` routines from the `math` library, and also the `sys` library. @@ -101,7 +137,13 @@ Try these features by completing the following steps: Because this code defines a function, you can quickly test it by calling the function a few times, as shown in the following example: + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-send-function-test.png" alt-text="Screenshot that shows how to run a test of the function code sent to the Interactive Window in Visual Studio." lightbox="media/visualstudio/tutor-python-3-send-function-test.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-send-function-test.png" alt-text="Screenshot that shows how to run a test of the function code sent to the Interactive Window in Visual Studio." lightbox="media/tutor-python-3-send-function-test.png"::: + :::moniker-end > [!TIP] > You can use the keyboard shortcut **Ctrl**+**Enter** to run the current line of code in the **Interactive Window**. After the code runs, the caret prompt moves to the next line. Select **Ctrl**+**Enter** repeatedly for a convenient way to step through your code, which isn't possible in the Python command-line experience. You can also use this approach to step through your code without running the debugger and without necessarily starting your program from the beginning. @@ -116,7 +158,13 @@ Try these features by completing the following steps: The multiline paste action is difficult to do in the Python command-line REPL experience. After your paste the code, the **Interactive Window** runs the code as if you entered it directly in the window: + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-copy-paste-code.png" alt-text="Screenshot that shows how to paste multiple lines of code into the Interactive Window in Visual Studio." lightbox="media/visualstudio/tutor-python-3-copy-paste-code.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-copy-paste-code.png" alt-text="Screenshot that shows how to paste multiple lines of code into the Interactive Window in Visual Studio." lightbox="media/tutor-python-3-copy-paste-code.png"::: + :::moniker-end The current code works, but the output isn't inspiring. A different step value in the `for` loop can show more of the cosine wave. The code the `for` loop is available in the REPL history as a single unit. You can locate the code and make whatever changes you want and test the function again. @@ -128,7 +176,13 @@ Try these features by completing the following steps: 1. Select **Ctrl**+**Enter** anywhere in the `for` loop statement to run the function again: + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-run-statement-again.png" alt-text="Screenshot that shows how to edit a previous statement in the Interactive Window in Visual Studio." lightbox="media/visualstudio/tutor-python-3-run-statement-again.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-run-statement-again.png" alt-text="Screenshot that shows how to edit a previous statement in the Interactive Window in Visual Studio." lightbox="media/tutor-python-3-run-statement-again.png"::: + :::moniker-end 1. Repeat the process to experiment with different step settings until you find a value you like. You can also make the wave repeat by lengthening the range, for example, `range(0, 1800, 12)`. @@ -142,7 +196,13 @@ Follow these steps to copy code from the **Interactive Window** to the editor: 1. Right-click the selected code and choose **Copy Code** or use the keyboard shortcut **Ctrl**+**Shift**+**C**. + :::moniker range="visualstudio" + :::image type="content" source="media/visualstudio/tutor-python-3-copy-save-code.png" alt-text="Screenshot that shows the Interactive Window copy code command on a selection that includes prompts and output in Visual Studio." lightbox="media/visualstudio/tutor-python-3-copy-save-code.png"::: + :::moniker-end + + :::moniker range="vs-2022" :::image type="content" source="media/tutor-python-3-copy-save-code.png" alt-text="Screenshot that shows the Interactive Window copy code command on a selection that includes prompts and output in Visual Studio." lightbox="media/tutor-python-3-copy-save-code.png"::: + :::moniker-end 1. Paste the copied code into the editor. This special feature of Visual Studio automatically omits any output, along with the `>>>` and `...` prompts, in the selection.