Skip to content

Commit

Permalink
Tweak dotnet message
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Jan 15, 2025
1 parent e586956 commit 1b1d5b0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ Use the [CycloneDX CLI][cyclonedx-cli-github] tool for advanced use cases such a

For `dotnet` and `dotnet-framework`, SBOM could include components without a version number. Often, these components begin with the prefix `System.`.

Global Assembly Cache (GAC) dependencies must be made available in the build output of the project for version detection. A simple way to have the dotnet build copy the GAC dependencies into the build directory is to place the file `Directory.Build.props` into the root of the project and ensure the contents include the following:
Global Assembly Cache (GAC) dependencies (System Runtime dependencies) must be made available in the build output of the project for version detection. A simple way to have the dotnet build copy the GAC dependencies into the build directory is to place the file `Directory.Build.props` into the root of the project and ensure the contents include the following:

```
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Expand All @@ -476,7 +476,7 @@ Global Assembly Cache (GAC) dependencies must be made available in the build out
</Project>
```

Then, run cdxgen dotnet9 image `ghcr.io/cyclonedx/cdxgen-debian-dotnet9:v11` with the `--deep` argument.
Then, run cdxgen cli with the `--deep` argument.

## License

Expand Down
4 changes: 2 additions & 2 deletions ci/base-images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ docker run --rm -e CDXGEN_DEBUG_MODE=debug -v /tmp:/tmp -v $(pwd):/app:rw -t ghc

For `dotnet` and `dotnet-framework`, SBOM could include components without a version number. Often, these components begin with the prefix `System.`.

Global Assembly Cache (GAC) dependencies must be made available in the build output of the project for version detection. A simple way to have the dotnet build copy the GAC dependencies into the build directory is to place the file `Directory.Build.props` into the root of the project and ensure the contents include the following:
Global Assembly Cache (GAC) dependencies (System Runtime dependencies) must be made available in the build output of the project for version detection. A simple way to have the dotnet build copy the GAC dependencies into the build directory is to place the file `Directory.Build.props` into the root of the project and ensure the contents include the following:

```
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Expand All @@ -141,7 +141,7 @@ Global Assembly Cache (GAC) dependencies must be made available in the build out
</Project>
```

Then, run cdxgen dotnet9 image `ghcr.io/cyclonedx/cdxgen-debian-dotnet9:v11` with the `--deep` argument.
Then, run cdxgen cli with the `--deep` argument.

### Python applications

Expand Down
12 changes: 7 additions & 5 deletions lib/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8892,13 +8892,15 @@ export function parseCsProjData(csProjData, projFile, pkgNameVersions = {}) {
}
if (!gacVersionWarningShown && pkg.name.startsWith("System.")) {
gacVersionWarningShown = true;
console.log("*** Found system packages without version ***");
console.log("*** Found system packages without a version ***");
console.log(
"Global Assembly Cache (GAC) dependencies must be made available in the build output of the project for version detection.",
);
console.log(
"Please follow the instructions in the readme: https://github.com/CycloneDX/cdxgen?tab=readme-ov-file#including-net-global-assembly-cache-dependencies-in-the-results. Run cdxgen dotnet9 container image 'ghcr.io/cyclonedx/cdxgen-debian-dotnet9:v11' with '--deep' argument.",
"Global Assembly Cache (GAC) dependencies must be included in the project's build output for version detection. Please follow the instructions in the README: https://github.com/CycloneDX/cdxgen?tab=readme-ov-file#including-net-global-assembly-cache-dependencies-in-the-results.",
);
if (process.env?.CDXGEN_IN_CONTAINER === "true") {
console.log(
"NOTE: cdxgen must be run in CLI mode from an environment identical to the production environment. Otherwise, the reported version numbers will correspond to the cdxgen container image instead of the target version!",
);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion types/lib/helpers/utils.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b1d5b0

Please sign in to comment.