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

CycloneDX cannot be installed on .NET 9 #908

Closed
nil4 opened this issue Oct 17, 2024 · 1 comment
Closed

CycloneDX cannot be installed on .NET 9 #908

nil4 opened this issue Oct 17, 2024 · 1 comment
Labels
triage Don't know what to do with this yet

Comments

@nil4
Copy link
Contributor

nil4 commented Oct 17, 2024

CycloneDX cannot be installed as a global tool on a .NET SDK version newer than the tool targeted when it was published.

For instance, v4.0.0, which targets net8.0, does not install on .NET SDK 9.0:

> dotnet --version
9.0.100-rc.2.24474.11

> dotnet tool install --global CycloneDX --version 4.0.0
Package cyclonedx is not a .NET tool.

The error message is in fact misleading, the root cause is that CycloneDX hasn't been configured to run on newer .NET runtimes.

This can be done by adding <RollForward>Major</RollForward> to the tool project file (ref. https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#major-version-runtime-roll-forward)

Additional references:

@github-actions github-actions bot added the triage Don't know what to do with this yet label Oct 17, 2024
@nil4
Copy link
Contributor Author

nil4 commented Oct 18, 2024

The root cause of this issue is a bug in .NET SDK 9.0-rc2: dotnet/sdk#43844

Closing this but keeping related PR to enable running CycloneDX on later .NET SDKs than those it was published for.

@nil4 nil4 closed this as completed Oct 18, 2024
mtsfoni pushed a commit that referenced this issue Nov 17, 2024
Enables installing and running `CycloneDX` on runtimes/SDKs newer than those
that it targets when published. For instance, allows v4.0.0 to run with
.NET SDK 9.0 installed.

Fixes #908

Signed-off-by: nil4 <nil4@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Don't know what to do with this yet
Projects
None yet
Development

No branches or pull requests

1 participant