When attempting to execute dotnet pack --no-build, the operation fails with the following error:
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(238,5): error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
I suspect this is caused by a build being triggered on the dependency, but this is not allowed. Ideally the system would respect the --no-build request. This is very important for build systems that need to perform some step in between build and package (such as signing delay-signed DLLs) where doing the build step immediately before a pack would be functionally incorrect.
When attempting to execute
dotnet pack --no-build, the operation fails with the following error:I suspect this is caused by a build being triggered on the dependency, but this is not allowed. Ideally the system would respect the
--no-buildrequest. This is very important for build systems that need to perform some step in between build and package (such as signing delay-signed DLLs) where doing the build step immediately before a pack would be functionally incorrect.I stumbled across dotnet/sdk#25132, which states that setting
BuildProjectReferences=falsefixed theNETSDK1085(see dotnet/sdk#24943) error when usingdotnet nuget pack --no-build.Can you, @mpdelbuono, @Prunkles, @varnerknut and @MeikelLP please verify this?
@Prunkles, see Prunkles/Tenekon.MSBuild.Packaging.ProjectBuildInPackage_NoBuildRepro#1 (Pull Request)