Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ebugusey opened this issue Jun 6, 2024 · 1 comment · Fixed by #511
Labels
bug Something isn't working

Comments

@ebugusey
Copy link

ebugusey commented Jun 6, 2024

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.

@ebugusey ebugusey added the bug Something isn't working label Jun 6, 2024
@kzu
Copy link
Member

kzu commented Jun 12, 2024

Please consider sponsoring @devlooped so I can prioritize this issue 🙏

@kzu kzu closed this as completed Aug 9, 2024
@devlooped devlooped locked and limited conversation to collaborators Nov 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants