Skip to content

error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked #501

Description

@ebugusey

Describe the Bug

It seems this #407 bug is not entirely fixed. Don't know if I should write there or here, because repro steps differ.

Steps to Reproduce

  1. Have project structure like this:
    Project1 -> Project2 -> Project3, where -> is "depends on"
  2. Project1 should be packable.
  3. Add NuGetizer to each project.
  4. Run commands:
dotnet build
dotnet pack --no-build --verbosity normal

Expected Behavior

Package for Project1 should be created.

Exception with Stack Trace

     1>Project "/home/user/Documents/repo/temp/ClassLibrary1/ClassLibrary1.sln" on node 1 (pack target(s)).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Release|Any CPU".
     1>Project "/home/user/Documents/repo/temp/ClassLibrary1/ClassLibrary1.sln" (1) is building "/home/user/Documents/repo/temp/ClassLibrary1/Project1/Project1.csproj" (4) on node 1 (pack target(s)).
     4>Project "/home/user/Documents/repo/temp/ClassLibrary1/Project1/Project1.csproj" (4) is building "/home/user/Documents/repo/temp/ClassLibrary1/Project3/Project3.csproj" (3:3) on node 3 (default targets).
     3>/usr/share/dotnet/sdk/8.0.105/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. [/home/user/Documents/repo/temp/ClassLibrary1/Project3/Project3.csproj]
     3>Done Building Project "/home/user/Documents/repo/temp/ClassLibrary1/Project3/Project3.csproj" (default targets) -- FAILED.
     4>Done Building Project "/home/user/Documents/repo/temp/ClassLibrary1/Project1/Project1.csproj" (pack target(s)) -- FAILED.
     1>Done Building Project "/home/user/Documents/repo/temp/ClassLibrary1/ClassLibrary1.sln" (pack target(s)) -- FAILED.

Version Info

NuGetizer: 1.2.2

Additional Info

It's not reproducible when there are only one level of dependent projects, i.e. Project1 -> Project2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions