Skip to content
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

Cannot evaluate [MSBuild]::VersionLessThan with wildcards #10995

Open
sibber5 opened this issue Nov 18, 2024 · 3 comments
Open

Cannot evaluate [MSBuild]::VersionLessThan with wildcards #10995

sibber5 opened this issue Nov 18, 2024 · 3 comments
Labels
gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you Priority:2 Work that is important, but not critical for the release triaged

Comments

@sibber5
Copy link

sibber5 commented Nov 18, 2024

Issue Description

MSBuild can't evaluate [MSBuild]::VersionLessThan when the version contains a wilcard, e.g. [MSBuild]::VersionLessThan(9.0.*, 8.2.0).

Steps to Reproduce

Call [MSBuild]::VersionLessThan with a version that contains a wildcard.

Expected Behavior

That it evaluates when the version contains a wildcard (uses the latest version that matches the wildcard).

Actual Behavior

It fails to evaluate.

Analysis

No response

Versions & Configurations

No response

@maridematte maridematte added Priority:2 Work that is important, but not critical for the release triaged gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you labels Nov 19, 2024
@maridematte
Copy link
Contributor

Team triage: Could you give us an example of usage for this? We're trying to understand some relevant scenarios for this feature.

@sibber5
Copy link
Author

sibber5 commented Nov 21, 2024

well i got the issue when i tried to set it to use the latest patch version of the aspire sdk by setting the version to 9.0.*

@jrdodds
Copy link
Contributor

jrdodds commented Dec 3, 2024

@sibber5 The version comparison functions, including VersionLessThan(), accept two strings that represent either a four-part version or a semver. The functions don't know what package, if any, that the strings may be related to. Determining "the latest version that matches the wildcard" is outside of these functions.

Are you invoking the VersionLessThan() function in your own custom MSBuild code or is this function invoked by MSBuild code within the Aspire Sdk? If the latter, i.e. referencing the SDK using a wildcard creates a problem, that may be an issue to file against the Aspire SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you Priority:2 Work that is important, but not critical for the release triaged
Projects
None yet
Development

No branches or pull requests

3 participants