tintoy / msbuild-project-tools-vscode

VS Code extension for MSBuild intellisense (including PackageReference completion).
MIT License
83 stars 17 forks source link

Support for Microsoft.Build.CentralPackageVersions #103

Open loligans opened 2 years ago

loligans commented 2 years ago

It would be very nice if completion information could be provided for projects that use: Microsoft.Build.CentralPackageVersions and its Packages.props file.

Project location here: https://github.com/microsoft/MSBuildSdks/tree/main/src/CentralPackageVersions


- In your `Directory.Build.props` or `.csproj` files, you add your Package Reference (Note: The `Version` attribute intentionally left out):  
  `<PackageReference Include="System.Text.Json" />`
tintoy commented 2 years ago

Interesting! Yeah I think we could support this (it’d currently ignore any package elements that didn’t match the expected format). I’ll take a look at this tomorrow morning and see what would be involved 🙂

tintoy commented 2 years ago

Still looking into this (sorry, been pretty busy at work this week) 🙂

loligans commented 2 years ago

No problem, I appreciate you looking into this 😌

jeroenhabets commented 10 months ago

@tintoy, @loligans Please note that deprecated CentralPackageVersions [1] has been superseded by Central Package Management [2].

Therefore I strongly suggest to add support for Central Package Management and its Directory.Packages.props file.

[1] https://github.com/microsoft/MSBuildSdks/tree/main/src/CentralPackageVersions#deprecated [2] https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management