The NuGet Resources Extractor provides the means to configure an automatic extraction of NuGet package dependencies from a NuGet repository for use during a .NET analysis. In other words, NuGet package based source code that resides in a simple local or http://nuget.org location. This extractor should be used when you want to extract packages (.nupkg) based source code that is stored in a NuGet repository. For example, when your .NET application contains .csproj files which have package references defined, you can use this extractor to extract those NuGet packages from the NuGet repository. Example package references in a .csproj are shown below:
<ItemGroup>
<!-- ... -->
<PackageReference Include="Contoso.Utility.UsefulStuff" Version="3.6.0" />
<!-- ... -->
</ItemGroup>
Applicable in CAST Version
Release |
Yes/No |
---|---|
8.3.x |
✅ |
Purpose
This page is for the case where we have to configure a Nuget repository with a username and password to access the Nuget packages.
This extractor is driven by options located in the following file on each node:
Imaging v3
%PROGRAMDATA%\CAST\Imaging\CAST-Imaging-Analysis-Node\application.yml
Console v2:
%PROGRAMDATA%\CAST\AIP-Node\application.yml
Console v1:
%PROGRAMDATA%\CAST\AipConsole\AipNode\aip-node-app.properties
Currently, it is not possible to configure a username and password for the Nuget repository as it is using the default one, but as a workaround, you can try changing the Nuget.config file by adding other repositories with their credentials as shown below:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="MyPrivateRepo" value="https://myprivaterepo.com/nuget" />
<add key="AnotherRepo" value="https://anotherrepo.com/nuget" />
</packageSources>
<packageSourceCredentials>
<MyPrivateRepo>
<add key="Username" value="myUsername" />
<add key="ClearTextPassword" value="myPassword" />
</MyPrivateRepo>
<AnotherRepo>
<add key="Username" value="anotherUsername" />
<add key="ClearTextPassword" value="anotherPassword" />
</AnotherRepo>
</packageSourceCredentials>
</configuration>
This nuget, config is present inside the plugin folder ..\plugins\dmtdotnetnugetresourcesextractor-1.1.4\nugetFiles after the extension is downloaded.
So this can be done not in the very first version but from the second version onwards after the extension is present in the plugin folder.
User can modify it according to their multiple repository need and then try packaging.
Notes/comments
Comments