Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 2.39 KB

build-and-run.md

File metadata and controls

42 lines (31 loc) · 2.39 KB

Build and run the Sbom tool

Prerequisites

  • In order to build the SBOM tool, please download and install Dotnet SDK version 3.1.300 or greater.
  • Clone this GitHub repo.

Running from command line

Execute the following dotnet command from the root of the sbom tool repo to build the tool.

dotnet build

The most basic run:

dotnet run --project src/Microsoft.Sbom.Tool generate -- -b <drop path> -bc <build components path> -pn <package name> -pv <package version> -nsb <namespace uri base>

You can add --no-restore or --no-build if you don't want to rebuild before the run

You can add --Debug to get the application to wait for debugger attachment to complete.

Running in Visual Studio (2019+)

  1. Open Microsoft.Sbom.sln in Visual Studio
  2. Set the Microsoft.Sbom.Tool project as the startup project (rightclick-> Set as Startup Project)
  3. Set Run arguments for the Microsoft.Sbom.Tool project (rightclick->properties->Debug)
    Minimum: generate -b <drop path> -bc <build components path> -pn <package name> -pv <package version> -nsb <namespace uri base>
  4. Now, any time you make a change, you can press F5. This will build the changes, and start the process in debug mode (hitting any breakpoints you set)

Using Codespaces

If you have access to GitHub Codespaces, select the Code button from the repository homepage then select Open with Codespaces. That's it! You have a full developer environment that supports debugging, testing, auto complete, jump to definition, everything you would expect.

Using VS Code DevContainer

This is similar to Codespaces:

  1. Make sure you meet the requirements and follow the installation steps for DevContainers in VS Code
  2. git clone https://github.com/microsoft/sbom-tool
  3. Open this repo in VS Code
  4. A notification should popup to reopen the workspace in the container. If it doesn't, open the Command Palette and type Remote-Containers: Reopen in Container.

After building

A full list of arguments can be found in here