Add ARCHITECTURE.md for the NuGet.Client repository#7228
Add ARCHITECTURE.md for the NuGet.Client repository#7228aortiz-msft wants to merge 6 commits intodevfrom
Conversation
nkolev92
left a comment
There was a problem hiding this comment.
A left a bunch of comments that copilot should be able to fix.
I do think it's worth eliminating the duplication with project-overview since that is a smaller more compact version of this, but it doesn't really contain opinionated explanations like this one does.
|
|
||
| A standalone console executable (`NuGet.Build.Tasks.Console.exe`) that runs restore using MSBuild's static graph functionality. This is the out-of-process restore host invoked by the `RestoreTaskEx` MSBuild task for improved performance and isolation. | ||
|
|
||
| Depends on: `NuGet.Build.Tasks` and all transitive core libraries. |
There was a problem hiding this comment.
Interestingly depends on is different here :D
There was a problem hiding this comment.
The "depends on" data was probably obtained from the DGML file which was generated deterministically by Visual Studio. Are you saying this is wrong?
There was a problem hiding this comment.
It's not wrong.
Some places it lists the full closure, others just the top one. I don't see how/why.
I think a project level DGML, or ideally a mermaid for github is probably better than the text.
There was a problem hiding this comment.
Since the DGML is auto-generated, and can be generated easily on-demand, I'm leaning towards not including these.
There was a problem hiding this comment.
Removing them is fine I agree.
The diagram is much more useful and honestly makes the whole doc shorter leaves less room for something to become outdated.
| This document describes the high-level architecture of NuGet.Client. | ||
| If you want to familiarize yourself with the codebase, you are in the right place! | ||
|
|
||
| See also the auto-generated [project overview](docs/project-overview.md), the [feature guide](docs/feature-guide.md), and the [coding guidelines](docs/coding-guidelines.md). |
There was a problem hiding this comment.
| See also the auto-generated [project overview](docs/project-overview.md), the [feature guide](docs/feature-guide.md), and the [coding guidelines](docs/coding-guidelines.md). | |
| See also [feature guide](docs/feature-guide.md), and the [coding guidelines](docs/coding-guidelines.md). |
project-overview is no more.
|
|
||
| These are the foundational libraries shared by all NuGet products. They are multi-targeted (`net472` and `net8.0`) and have no dependency on Visual Studio or any specific host. | ||
|
|
||
| #### [`NuGet.Versioning`](https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj) |
There was a problem hiding this comment.
These links should be relative, otherwise they'll take out of the editor.
If you are looking at this in code clicking this will take you to a browser, but you actually want the local link.
|
|
||
| A standalone console executable (`NuGet.Build.Tasks.Console.exe`) that runs restore using MSBuild's static graph functionality. This is the out-of-process restore host invoked by the `RestoreTaskEx` MSBuild task for improved performance and isolation. | ||
|
|
||
| Depends on: `NuGet.Build.Tasks` and all transitive core libraries. |
There was a problem hiding this comment.
Removing them is fine I agree.
The diagram is much more useful and honestly makes the whole doc shorter leaves less room for something to become outdated.
|
|
||
| #### [`NuGet.PackageManagement`](https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj) | ||
|
|
||
| Package management orchestration for install/uninstall/update flows (primarily used by the Visual Studio client and NuGet.exe `install`/`update` commands). Defines `NuGetPackageManager`, the abstract `NuGetProject` base class, and concrete project types like `MSBuildNuGetProject`, `FolderNuGetProject`, and `BuildIntegratedNuGetProject`. The `Audit/` subdirectory handles package vulnerability auditing. |
There was a problem hiding this comment.
The concrete types are not the ones I'd choose as "most important".
We can tweak them, or remove them.
My vote is remove them.
|
|
||
| #### [`NuGet.Localization`](https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Localization/NuGet.Localization.csproj) | ||
|
|
||
| Localization satellite assemblies for the dotnet CLI. Leaf dependency. |
There was a problem hiding this comment.
This is just a payload package.
|
|
||
| #### [`NuGet.SolutionRestoreManager`](https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Clients/NuGet.SolutionRestoreManager/NuGet.SolutionRestoreManager.csproj) | ||
|
|
||
| The second VS package. `RestoreManagerPackage` auto-loads when a solution is open and hooks into VS build events. `SolutionRestoreBuildHandler` triggers restore before build. `SolutionRestoreWorker` executes restore jobs. `VsSolutionRestoreService` exposes restore as a brokered service. |
There was a problem hiding this comment.
RestoreManagerPackage by design contains a slimmed down version of the NuGet assemblies, allowing the functionality to be loaded early without paying a performance cost.
|
|
||
| Depends on: `NuGet.Commands`, `NuGet.PackageManagement`, `NuGet.VisualStudio`, `NuGet.VisualStudio.Internal.Contracts`, and core libraries. | ||
|
|
||
| #### [`NuGet.VisualStudio`](https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Clients/NuGet.VisualStudio/NuGet.VisualStudio.csproj) |
|
|
||
| ### MEF Composition (VS) | ||
|
|
||
| The VS extension uses MEF (Managed Extensibility Framework) extensively for service discovery and dependency injection. Key exports include `VSSolutionManager`, `ExtensibleSourceRepositoryProvider`, `NuGetUIFactory`, `VsPackageInstaller`, and the PowerShell console providers. Services are composed by VS's `SComponentModel`. |
There was a problem hiding this comment.
| The VS extension uses MEF (Managed Extensibility Framework) extensively for service discovery and dependency injection. Key exports include `VSSolutionManager`, `ExtensibleSourceRepositoryProvider`, `NuGetUIFactory`, `VsPackageInstaller`, and the PowerShell console providers. Services are composed by VS's `SComponentModel`. | |
| The VS extension uses MEF (Managed Extensibility Framework) extensively for service discovery and dependency injection. Key exports include `VSSolutionManager`, `ExtensibleSourceRepositoryProvider`, `NuGetUIFactory`, `VsPackageInstaller`, and the PowerShell console providers. |
Bug
Fixes: N/A
Description
Adds
architecture.mdfile to help LLMs generate code for the repository.Also:
architecture.mdfile when needed.project-overview.mdfile which was auto-generated and more limited in comparison.PR Checklist