Nuget Cache Feature
Caches NuGet packages on .NET steps to speed up the builds. The feature tracks NuGet global-packages directories used by the dotnet
command and caches packages in the artifact storage. The cache is automatically updated when dependencies of the corresponding .NET projects change. NuGet package caching is supported when the build command uses .NET SDK 7.0.200 or higher.
Package caching is most effective on short-lived agents. For long-lived or permanent cloud agents, periodically review hidden .teamcity.build_cache
build artifacts to monitor cache size and contents. This helps prevent redundant dependencies and unnecessary cache bloat.
Example. Enables NuGet cache to speed up the builds
buildType {
// Other Build Type settings ...
features {
// Other Build Features ...
nugetCache {
}
Content copied to clipboard }
}
See also
Functions
Copies parameters of this object to the specified target
Creates an instance of this build feature via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.
Validates this object and reports found errors to the provided consumer