'CycloneDx is not able to find project.assets.json file in correct path
So I am working on azure pipeline and was planning to use the cyclonedx for dependency track for our dotnet project hosted on windows agent.
I am using the latest version of cyclone dx:
> Tool 'cyclonedx' is already installed. Tool 'cyclonedx' was
> reinstalled with the latest stable version (version '2.3.0').
Able to create an empty BOM file but without the appropriate reference contents.
So for my creation of BOM , its not able to find the project.assets.json. But this file actually exists in the different folder , when I checked my Nuget restore Task
Writing assets file to disk. Path: D:\BuildAgent\_work\54\b\obj\BestPractices.Services\project.assets.json
And for the error while the creation of BOM tasks, it actually throws this error.
» Analyzing: D:\BuildAgent\_work\54\s\src\BestPractices.Peer\BestPractices.Peer.csproj
Attempting to restore packages
Packages restored
File not found: "D:\BuildAgent\_work\54\s\src\BestPractices.Peer\obj\project.assets.json", "D:\BuildAgent\_work\54\s\src\BestPractices.Peer\BestPractices.Peer.csproj"
No packages found
» Analyzing: D:\BuildAgent\_work\54\s\src\BestPractices.Services\BestPractices.Services.csproj
Attempting to restore packages
Packages restored
File not found: "D:\BuildAgent\_work\54\s\src\BestPractices.Services\obj\project.assets.json", "D:\BuildAgent\_work\54\s\src\BestPractices.Services\BestPractices.Services.csproj"
No packages found
I did a dotnet clean and dotnet restore but the cyclonedx task is always trying to search the Build.SourcesDirectory while the json files are in Build.BinariesDirectory. Can Nuget Create these project.assets.json in the Build.SourcesDirectory?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
