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

Aspire SDK fails build when using exact versions of dependency Aspire.Hosting.AppHost #7194

Open
1 task done
dmitrynovik opened this issue Jan 22, 2025 · 2 comments
Open
1 task done
Milestone

Comments

@dmitrynovik
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Our company build requires that all external packages are pinned to a specific versions e.g. [9.0.0]. It fails the build otherwise.

The Aspire SDK does not honour the square brackets.
The following package reference (note the brackets):

  <ItemGroup>
    <PackageReference Include="Aspire.Hosting.AppHost" Version="[9.0.0]"  />
  </ItemGroup>

Produces the compile error

error MSB4184: The expression "[MSBuild]::VersionLessThan([9.0.0], 8.2.0)" cannot be evaluated. Version string was not in a correct format

Expected Behavior

The pinned version should work - strip [] from the SemVer.

Steps To Reproduce

Square-bracket the package version of Aspire.Hosting.AppHost e.g.:

<PackageReference Include="Aspire.Hosting.AppHost" Version="[9.0.0]"  />

### Exceptions (if any)

_No response_

### .NET Version info

_No response_

### Anything else?

_No response_
@davidfowl
Copy link
Member

This is a dupe of #7102

@joperezr joperezr added untriaged New issue has not been triaged area-acquisition labels Jan 24, 2025
@joperezr
Copy link
Member

Good catch! Not exactly a dupe, but they both surely have the same root cause and should be fixed by the same change. I'll add this to the 9.1 milestone to tackle along with #7102.

@joperezr joperezr added this to the 9.1 milestone Jan 24, 2025
@joperezr joperezr removed the untriaged New issue has not been triaged label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants