-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds related features for working with the packages.config file #30
Conversation
MvsSln/MvsSln/Projects/IPackagesConfig.cs Line 91 in bc0bfb1
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. |
bc0bfb1
to
f858ede
Compare
Rebased onto f5374f8 |
Not yet fully tested
Finally pushed some implementation (based on my #27 (comment)) A small changes to the original design: Removed methods: - IPackagesConfig.LoadOrNew() PackagesConfigOptions was introduced instead. Added: + IPackageInfo.Remove() - actually just for the convenience. Will be invoked IPackagesConfig.Remove() related method. Not yet fully tested. Need to cover the remaining parts. Play before merge! |
* FIXED: Fixed CalculateHashCode() Extension. Internally affects many objects due to broken GetHashCode(). * FIXED: Fixed SlnItems.ProjectDependenciesXml when empty input: Report #25 (comment) * NEW: packages.config support PR #30. Related issues #27, #28. To activate it, use the following flags: * PackagesConfig, PackagesConfigSolution, PackagesConfigLegacy. For example, ``` using Sln l = new("Input.sln", SlnItems.AllNoLoad | SlnItems.PackagesConfig); IPackageInfo found = l.Result.PackagesConfigs .SelectMany(s => s.Packages) .FirstOrDefault(p => p.Id.StartsWith("Microsoft.")); // found.MetaTFM ... Version v = l.Result.PackagesConfigs.First().GetPackage("LX4Cnh")?.VersionParsed; ``` Including GetNuTool compatible packages, format: https://github.com/3F/GetNuTool#format-of-packages-list * NEW: Added HasValue and HasNothing properties in PropertyItem. * NEW: Added SlnItems.AllMinimal and SlnItems.AllNoLoad in addition to SlnItems.All. * NEW: Added IXProject.GetPackageReferences(). * CHANGED: ConfigItem.Format() marked as obsolete. Use `ToString()` and `IConfPlatform.Formatted` instead.
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.