pgscan 1.5.12
dotnet tool install --global pgscan --version 1.5.12
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local pgscan --version 1.5.12
#tool dotnet:?package=pgscan&version=1.5.12
nuke :add-package pgscan --version 1.5.12
pgscan
This tool is used to gather actual dependencies used by a .net/npm/pypi project and publish them to a ProGet instance. It is available as a standalone tool
for Windows/Linux, an installable dotnet tool, or a .net class library. Its functionality
is also available in OtterScript directly using the ProGet::Record-Dependencies
operation.
Installation (standalone CLI)
Download the latest version from the Releases page.
Installation (dotnet tool)
Install the tool using dotnet. For example, to install the tool locally to the current tool manifest:
dotnet tool install pgscan
Usage (CLI/tool)
Execute pgscan
with the identify
command. For example, to generate an SBOM and submit the dependencies of v1.0.0 the MyLibrary
project to ProGet:
pgscan identify --input=MyLibrary.csproj --proget-url=https://proget.local --version=1.0.0
Note that the identify
command requires ProGet 2022 and later. If you're using ProGet 6.0, you'll need to use the now-deprecated publish
command; see the old version of this README to learn how.
Usage (OtterScript)
Use the ProGet::Record-Dependencies operation:
ProGet::Record-Dependencies
(
Project: MyProject.csproj,
Resource: LocalProGet,
Feed: Libraries,
ConsumerVersion: $ReleaseNumber
);
Usage (GitHub Actions)
Use a local dotnet tool
action to run pgscan on Windows and Linux build agents.
- Create a ProGet API key
- Once the API Key is created in ProGet, you will need to add it as a Secret on your GitHub project
- Navigate to your project in GitHub
- Click "Settings"
- Navigate to "Secrets → Actions" on the right
- Click "New repository secret"
- Enter a name (ex:
PROGETAPIKEY
) and your API key as the secret value
- Commit a dotnet tool manifest
- At the root of your repository, run
dotnet new tool-manifest
(see Microsoft's local tool documentation for more information) - Commit this to your git repository
- At the root of your repository, run
- Setup .NET 6.0 in your workflow
- If you are already using dotnet 6 in your workflow, go to the next step.
- Add the following to your workflow:
- name: Setup .NET uses: actions/setup-dotnet@v2 with: dotnet-version: 6.0.x
- This can be added anywhere before the pgscan steps, but is typically added at the beginning
- Add the pgscan steps after build/publish steps of your code
- name: Install pgscan
run: dotnet tool install pgscan
- name: Run pgscan
working-directory: ProfiteCalcNet.Console
run: dotnet tool run pgscan identify --type=nuget --input=MyProject.csproj --project-name=MyProject --version=1.0.0 --project-type=application --proget-url=https://proget.local --api-key=${{ secrets.PROGETAPIKEY }}
Usage (Azure DevOps)
Use a local dotnet tool
action to run pgscan on Windows and Linux build agents.
- Create a ProGet API key
- Once the API Key is created in ProGet, you will need to add it as a secrete Variable on your pipeline.
- Navigate to your pipeline in Azure DevOps
- Click Edit
- Click Variables and then the plus icon
- Enter a name (ex:
PROGETAPIKEY
) and your API key as the value - Check "Keep this value Secret"
- Click OK
- Commit a dotnet tool manifest
- At the root of your repository, run
dotnet new tool-manifest
(see Microsoft's local tool documentation for more information) - Commit this to your git repository
- At the root of your repository, run
- Add .NET 6.0 in your pipeline
- If you are already using dotnet 6 in your pipeline, go to the next step.
- Add the following to your workflow:
- task: UseDotNet@2 inputs: packageType: 'sdk' version: '6.0.x'
- This can be added anywhere before the pgscan steps, but is typically added at the beginning
- Add the pgscan steps after build/publish steps of your code
- script: dotnet tool install pgscan - script: dotnet tool run pgscan identify --type=nuget --input=MyProject.csproj --project-name=MyProject --version=1.0.0 --project-type=application --proget-url=https://proget.local --api-key=$(PROGETAPIKEY)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
1.5.12 | 17,187 | 1/27/2024 |
1.5.11 | 230 | 1/23/2024 |
1.5.10 | 168 | 1/23/2024 |
1.5.8 | 957 | 11/22/2023 |
1.5.7 | 166 | 11/22/2023 |
1.5.6 | 1,447 | 9/20/2023 |
1.5.5 | 419 | 9/11/2023 |
1.5.4 | 917 | 8/15/2023 |
1.5.3 | 2,669 | 8/2/2023 |
1.5.2 | 267 | 8/1/2023 |
1.5.1 | 848 | 6/17/2023 |
1.5.0 | 1,019 | 5/13/2023 |
1.4.3 | 1,370 | 3/7/2023 |
1.4.2 | 337 | 2/27/2023 |
1.4.1 | 1,285 | 12/15/2022 |
1.4.0 | 1,707 | 9/14/2022 |
1.3.2 | 387 | 9/13/2022 |
1.3.1 | 465 | 7/8/2022 |
1.3.0 | 428 | 6/27/2022 |
1.2.3 | 424 | 6/22/2022 |
1.2.2 | 408 | 6/2/2022 |
1.2.1 | 427 | 6/1/2022 |
1.2.0 | 446 | 5/11/2022 |
1.1.1 | 442 | 2/15/2022 |
1.1.0 | 359 | 10/26/2021 |