Commit Graph

9 Commits

Author SHA1 Message Date
Mattias Karlsson 5d9e0b82b5 fix(manager/nuget): detect MSBuild SDK updates in sqlproj files (#43831)
* fix(manager/nuget): detect MSBuild SDK updates in sqlproj files

MSBuild SDK versions in `<Sdk>`, `<Import Sdk>`, and `<Project Sdk>`
elements are exact pins, but NuGet versioning treats bare versions as
minimum ranges (`>=`). That caused dependencies such as
`0.1.19-preview` to resolve to the latest release and skip updates.

Apply hybrid versioning to all `msbuild-sdk` dependencies at extract
time: use strict `semver` when the pin is valid semver, otherwise fall
back to `semver-coerced` for non-standard NuGet version strings (e.g.
four-segment revisions). Also add `.sqlproj` to the default manager
file patterns for SSDT SQL projects.

Changes:
- Add `applyMsbuildSdkVersioning()` helper and wire it through all
  msbuild-sdk extract paths (XML, global.json, single-csharp-file)
- Extend `managerFilePatterns` to match `.sqlproj` files
- Add extract, util, index, and integration tests
- Document `.sqlproj` and MSBuild SDK extraction in nuget docs/readme

* fix(manager/nuget): use bump range strategy for msbuild-sdk deps

Replace hybrid semver versioning for MSBuild SDK pins with a default
package rule (`matchDepTypes: msbuild-sdk`, `rangeStrategy: bump`) per
review feedback. Remove `applyMsbuildSdkVersioning()` from all extract
paths and update tests accordingly. Sort nuget doc file extensions
alphabetically.
2026-07-02 05:13:47 +00:00
RahulGautamSingh 4f7eed4273 feat(manager/nuget): default rangeStrategy to bump (#43820)
* docs(manager/nuget): treat bare-version as range

* nuget: default rangeStrategy to bump

* Update lib/modules/manager/nuget/index.ts

Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>

* apply suggestions

---------

Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>
2026-06-05 20:22:22 +00:00
Philipp Grathwohl 5505b52d75 feat(manager/nuget): Support single file package directives (#40040)
* Add nuget capability to read packages from cs files

This is useful for dotnet source files that make use
of the .NET 10 feature to have single file projects,
where packages and sdks can be defined in a source
file.

* Add tests to validate that the nuget.config file is respected for single csharp files

* Apply PR linter suggestion for prettier code

* Remove unnecessary try-catch to increase code coverage

* Update phrasing in documentation

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Use codeblock instead of fixture

* Remove unused import

* Remove unnecessary fixtures and only verify required methods are called

* Fix imports in single-chsarp-file.ts

* Fix import ordering

* Increase code block indent

---------

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-19 18:06:30 +00:00
Michael Kriese df2adeb110 feat(nuget): allow restoring workloads before restoring packages (#37449) 2025-08-12 13:10:55 +00:00
Martin Costello 4e036116df docs(nuget): Fix NuGet casing (#36501) 2025-06-13 09:57:20 +00:00
Rhys Arkins 58e448281d feat(nuget): extract full ranges (#35343)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-04-23 10:12:34 +00:00
Michael Kriese 4b7a5e7b62 docs: use relative links (#26044) 2023-11-29 18:10:17 +00:00
HonkingGoose 9d35b9df07 docs(nuget): rewrite readme (#16179) 2022-06-24 12:42:07 +02:00
Rhys Arkins dca3418bbd refactor: lib/modules (#14488)
Moves datasource, manager, platform and versioning code from lib/ into new lib/modules/

BREAKING CHANGE: External tools must update paths to datasource, manager, platform and versioning
2022-03-04 09:04:02 +01:00