LibraryManager icon indicating copy to clipboard operation
LibraryManager copied to clipboard

Suggestion: Allow LibMan support in Visual Studio to be activated by a project capability

Open jimmylewis opened this issue 5 years ago • 2 comments

Functional impact

This would allow any project to opt-in to libman support (context menu items, add library wizard).

Minimal repro steps

  1. Create a Razor Class Library project
  2. Try to add a library via LibMan wizard (e.g. for image assets)

Expected result

Some way to allow enabling the LibMan wizard.

Actual result

Editing libman.json works, but there's no way to get the wizard to work.

Further technical details

Enabling LibMan via a project capability means that anyone could edit their project file, even if not a web project, to opt-in to LibMan support.

Since the editor support works as long as there's a libman.json file, this issue is mostly to see if there's interest in enabling wizard support in other project types.

jimmylewis avatar Sep 16 '20 06:09 jimmylewis

there is a workaround for razor class libs:

<Project Sdk="Microsoft.NET.Sdk.Razor;Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <OutputType>Library</OutputType>
  </PropertyGroup>
  <ItemGroup>
    <FrameworkReference Remove="Microsoft.AspNetCore.App" />
  </ItemGroup>

.... could be packed into an SDK

TFTomSun avatar Mar 12 '21 05:03 TFTomSun

Couldn't you just enable the UI as soon as a libman.json file is found?

rouke-broersma avatar Nov 26 '21 14:11 rouke-broersma