Skip to content

Full support of LSL

Rohit Agrawal edited this page Jun 19, 2017 · 7 revisions

[Spec] Full support of the Lightweight Solution Load

Problem

NuGet client in VS is not fully functional in LSL mode. Currently only restore operation is supported. The main problem is NuGetProject and other components are not aware of LSL mode as all information from VS are retrieved via EnvDTE or CPS API.

Solution

NuGet VS client needs to support LSL mode without breaking it.

Development activity is tracked in NuGet/Home#5058.

List of NuGet operations per NuGet package management project model

Operation packages.config project.json PackageRef .NET Core
Restore Supported Supported Supported N/A
Manage packages (solution) Supported Supported Supported N/A
Manage packages (project) Loads on right-click Loads on right-click Loads on right-click N/A
Install package (PM) Loads project Supported Loads project N/A
Uninstall package (PM) Loads project Supported Loads project N/A
Update package (PM) Loads project Supported Loads project N/A
Execute init.ps1 (PMC) Supported Supported Supported N/A
Add-BindingRedirect Loads project Loads project Loads project N/A
Find-Package N/A N/A N/A N/A
Get-Package Supported Supported Supported N/A
Get-Project Loads project Loads project Loads project N/A
Install-Package Loads project Supported Loads project N/A
Open-PackagePage N/A N/A N/A N/A
Sync-Package Supported Supported Loads project N/A
Tab expansion (PMC) Supported Supported Supported N/A
Uninstall-Package Loads project Supported Loads project N/A
Update-Package Loads project Supported Loads project N/A
IVsPackageInstallerServices Supported Supported Supported N/A

Shared Infrastructure

A project adapter will be introduced to abstract away communication with EnvDTE and CPS API where needed. The adapter implementation will be able to detect LSL mode and switch between data sources and APIs. It will force load project if no equivalent data is available in LSL DB.

Project services will be introduced where project system specific implementation is needed thus the project adapter alone won't fit.

packages.config

In LSL mode it facilitates PackagesConfigReader to retrieve package references. Works correctly in LSL mode for majority of read-only operations. For install, uninstall, update operations will force load project as it needs to update assembly references in the project.

project.json

Utilizes JsonPackageSpecReader to get a PackageSpec for the project.

PackageRef

Relies on IDeferredProjectWorkspaceService to get all necessary project data.

.NET Core (Roslyn project system)

Does not support LSL. No action needed.

Contributing

What's Being Worked On?

Check out the proposals in the accepted & proposed folders on the repository, and active PRs for proposals being discussed today.

Common Problems

Clone this wiki locally