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.
Download the latest version from the Releases page.
Install the tool using dotnet. For example, to install the tool locally to the current tool manifest:
dotnet tool install pgscan
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.
Use the ProGet::Record-Dependencies operation:
ProGet::Record-Dependencies
(
Project: MyProject.csproj,
Resource: LocalProGet,
Feed: Libraries,
ConsumerVersion: $ReleaseNumber
);
Use a local dotnet tool
action to run pgscan on Windows and Linux build agents.
PROGETAPIKEY
) and your API key as the secret valuedotnet new tool-manifest
(see Microsoft's local tool documentation for more information)- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- 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 }}
Use a local dotnet tool
action to run pgscan on Windows and Linux build agents.
PROGETAPIKEY
) and your API key as the valuedotnet new tool-manifest
(see Microsoft's local tool documentation for more information)
- 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)