3F / MvsSln

🧩 Customizable VisualStudio .sln parser with project support (.vcxproj, .csproj., …). Pluggable lightweight r/w handlers at runtime, and more …
MIT License
135 stars 27 forks source link

Adds related features for working with the packages.config file #30

Closed 3F closed 2 years ago

3F commented 3 years ago

Closes #28 Related #27

This also will add support for GetNuTool compatible packages

In particular, the following format https://github.com/3F/GetNuTool#format-of-packages-list

Not yet implemented. Currently, I think IPackagesConfig and IPackageInfo fully represents design of the future logic.

3F commented 3 years ago

https://github.com/3F/MvsSln/blob/bc0bfb1534ef4539e63cd96598006edd53712f4b/MvsSln/Projects/IPackagesConfig.cs#L91

Because, for example, VS 16.6.3 can't process the following:

  <package id="ILAsm" version="4.700.1" />
  <package id="ILAsm" version="4.700.2" />

Either fails for opening manager in IDE or even crashed menu item :)

Therefore, any possible adding should be considered as /no more than one/ for the same id.

3F commented 2 years ago

Rebased onto f5374f8675eef82eba16b176a1f01efeb0104547

3F commented 2 years ago

Finally pushed some implementation (based on my https://github.com/3F/MvsSln/issues/27#issuecomment-650455307)

A small changes to the original design:

Removed methods:

- IPackagesConfig.LoadOrNew() - IPackagesConfig.Load()

PackagesConfigOptions was introduced instead.

Added:

+ IPackageInfo.Remove() - actually just for the convenience. Will be invoked IPackagesConfig.Remove() related method. + IPackageInfo.VersionParsed - same, For the better performance it will be initialized only on the first access. Thread-safe.

Not yet fully tested. Need to cover the remaining parts. Play before merge!