My TeamCity build definition contains dotnet pack command with --no-build modifier, and this step fails with error:
C:\Program Files\dotnet\sdk\7.0.102\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(161,5): error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
It looks like NuGetizer tries to rebuild referenced project:
Target "ResolveProjectReferences"
22:18:47 1>Target "ResolveProjectReferences" in file "C:\Program Files\dotnet\sdk\7.0.102\Microsoft.Common.CurrentVersion.targets" from project "C:\BuildAgents\Agent03\work\9efa6ed76414e7bd\MBS.Logging.SimpleInjector\MBS.Logging.SimpleInjector.csproj" (target "ResolveReferences" depends on it):
22:18:47 Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('true' == 'true' and '..\MBS.Logging\MBS.Logging.csproj' != '' and ('false' == 'true' or 'true' != 'true') and '17.0' != '10.0' and '..\MBS.Logging\MBS.Logging.csproj' != '').
22:18:47 Task "MSBuild"
22:18:47 Removing Properties for project "..\MBS.Logging\MBS.Logging.csproj":
22:18:47 TargetFramework
22:18:47 RuntimeIdentifier
22:18:47 SelfContained
22:18:47 Project "MBS.Logging.csproj"
22:18:47 1>Done executing task "MSBuild" -- FAILED.
22:18:47 1>Done building target "ResolveProjectReferences" in project "MBS.Logging.SimpleInjector.csproj" -- FAILED.
If I remove --no-build everthing works fine.
My TeamCity build definition contains
dotnet packcommand with--no-buildmodifier, and this step fails with error:It looks like NuGetizer tries to rebuild referenced project:
If I remove
--no-buildeverthing works fine.