# heku/kool.editproject architecture

> Architecture diagram of the GitHub repository heku/kool.editproject, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/heku/kool.editproject
- Repository: https://github.com/heku/kool.editproject

## Overview

##### Project type and purpose
- This is an open-source Visual Studio extension (VSIX) that adds “Edit Project File” and “Edit Solution File” context-menu commands inside the VS IDE.
- It targets two host environments: Visual Studio 2019 and Visual Studio 2022.

##### File structure
- Top-level solution (Kool.EditProject.sln) contains three main projects:
- Kool.EditProject.2019 (VSIX project for VS2019)
- Kool.EditProject.2022 (VSIX project for VS2022)
- Kool.EditProject.Shared (class library with all shared commands, models, pages, resources)
- The “Linked” folder holds common assets (VSCT menu definitions, localization templates) that both VSIX projects consume.
- Build & CI/CD: azure-pipelines.yml drives build, vsix.psm1 and publish.manifest​.{2019,2022}.json control packaging and publishing to the Marketplace.
- README and Screenshots document features and UI flows.

##### README for additional insights
- Confirms feature set (single/multiple project editing, solution editing, configurable options).
- Mentions known issue around overlapping “Edit” menus in .NET Core projects.
- Points to Azure DevOps build badge and Marketplace badges for each target.

##### Diagramming the architecture
- VSIX Project “Kool.EditProject.2019”
- VSIX Project “Kool.EditProject.2022”
- Shared Library “Kool.EditProject.Shared”
- “Kool.EditProject.Linked” assets (menus, localization)
- Visual Studio Host (2019 & 2022 processes)
- Azure DevOps build pipeline & Marketplace publishing
b. Relationships and interactions
- Both VSIX projects reference the Shared library and Linked assets.
- At runtime, VS loads the VSIX package → invokes command registrations from Shared.
- UI flows: user right-clicks project/solution → VS triggers command → Shared code launches the XML editor window.
- CI pipeline pulls code → builds all projects → produces two VSIX bundles → publishes to respective Marketplace endpoints.
c. Architectural patterns & principles
- Modular packaging: thin version-specific wrappers referencing a single shared core.
- Separation of concerns: Commands, Models, UI (Pages), and localization in distinct namespaces/folders.
- Resource linking: shared VSCT files and .resx resources kept in Linked folder to avoid duplication.
d. Key technologies & frameworks
- C#/.NET Framework (VS SDK)
- Visual Studio Extensibility (VSIX, .vsct)
- MSBuild / .csproj multi-targeting
- Azure DevOps (YAML pipelines)
- PowerShell (vsix.psm1) and JSON manifests for publishing

## Diagram (Mermaid)

```mermaid
flowchart TD
    Developer["Developer"]:::persona
    Developer -->|"invokes command"| VSHost["Visual Studio Host (2019 & 2022)"]:::runtime

    subgraph "Projects & Components"
        direction TB
        VSIX2019["Kool.EditProject.2019"]:::code
        VSIX2022["Kool.EditProject.2022"]:::code
        Shared["Kool.EditProject.Shared"]:::code
        Linked["Kool.EditProject.Linked"]:::assets
    end

    VSIX2019 -->|"References"| Shared
    VSIX2022 -->|"References"| Shared
    VSIX2019 -->|"Includes"| Linked
    VSIX2022 -->|"Includes"| Linked
    Shared -->|"Registers Commands"| VSHost

    subgraph "CI/CD & Publishing"
        direction TB
        Pipeline["azure-pipelines.yml"]:::ci
        VsixScript["vsix.psm1"]:::ci
        Manifest2019["publish.manifest.2019.json"]:::ci
        Manifest2022["publish.manifest.2022.json"]:::ci
        Marketplace["VS Marketplace"]:::ci
    end

    Pipeline -->|Build & Package| VSIX2019
    Pipeline -->|Build & Package| VSIX2022
    VsixScript -->|Packaging| VSIX2019
    VsixScript -->|Packaging| VSIX2022
    VSIX2019 -->|Publish 2019| Marketplace
    VSIX2022 -->|Publish 2022| Marketplace

    classDef code fill:#aed6f1,stroke:#1f618d,color:#1b2631;
    classDef assets fill:#a9dfbf,stroke:#196f3d,color:#145a32;
    classDef runtime fill:#f5cba7,stroke:#d35400,color:#6e2c00;
    classDef ci fill:#d7bde2,stroke:#7d3c98,color:#4a235a;
    classDef persona fill:#f9e79f,stroke:#b7950b,color:#7d6608;

    click VSIX2019 "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.2019/Kool.EditProject.2019.csproj"
    click VSIX2019 "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.2019/source.extension.vsixmanifest"
    click VSIX2022 "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.2022/Kool.EditProject.2022.csproj"
    click VSIX2022 "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.2022/source.extension.vsixmanifest"
    click Shared "https://github.com/heku/kool.editproject/tree/main/Kool.EditProject.Shared/Commands"
    click Shared "https://github.com/heku/kool.editproject/tree/main/Kool.EditProject.Shared/Models"
    click Shared "https://github.com/heku/kool.editproject/tree/main/Kool.EditProject.Shared/Pages"
    click Shared "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Shared/Package.cs"
    click Shared "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Shared/Ids.cs"
    click Shared "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Shared/Properties/AssemblyInfo.cs"
    click Shared "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Shared/zh-Hans/extension.vsixlangpack"
    click Shared "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Shared/Kool.EditProject.Shared.projitems"
    click Shared "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Shared/Kool.EditProject.Shared.shproj"
    click Linked "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Linked/Menus.vsct"
    click Linked "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Linked/Menus.en.vsct"
    click Linked "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Linked/Menus.zh-Hans.vsct"
    click Linked "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Linked/I18n.tt"
    click Linked "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Linked/I18n.Designer.cs"
    click Linked "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Linked/I18n.en.resx"
    click Linked "https://github.com/heku/kool.editproject/blob/main/Kool.EditProject.Linked/I18n.zh-Hans.resx"
    click Linked "https://github.com/heku/kool.editproject/tree/main/Kool.EditProject.Linked/Resources"
    click Pipeline "https://github.com/heku/kool.editproject/blob/main/azure-pipelines.yml"
    click VsixScript "https://github.com/heku/kool.editproject/blob/main/vsix.psm1"
    click Manifest2019 "https://github.com/heku/kool.editproject/blob/main/publish.manifest.2019.json"
    click Manifest2022 "https://github.com/heku/kool.editproject/blob/main/publish.manifest.2022.json"
```
