18

In Eclipse we "clean". In Ant we "clean".

How do we clean or force a rebuild with DotNet Core command on the Mac? Trying to rebuild with the simple build command wont build.

   Project library (.NETStandard,Version=v1.6) was previously compiled. Skipping compilation.
    Project test-library (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
   No executable found matching command "dotnet-clean"
$ :(

Edit: Just a note that dotnet clean now is a command.

3
  • Does "rebuild" work?
    – ChrisF
    Nov 14, 2016 at 21:28
  • That would have been awesome :P
    – span
    Nov 14, 2016 at 21:41
  • 1
    I take it that that's a "no" then? Oh well
    – ChrisF
    Nov 14, 2016 at 21:42

1 Answer 1

49

Use:

dotnet build --no-incremental

As stated in .NET Core SDK Documentation, --no-incremental option:

Marks the build as unsafe for incremental build. This flag turns off incremental compilation and forces a clean rebuild of the project's dependency graph.

3
  • 4
    Ver nice. For the copy pasting mac users: $ dotnet build --no-incremental.
    – span
    Nov 15, 2016 at 15:05
  • 4
    Of course, this answer applies not only to Mac OS. It helped me on Windows machine. Thx.
    – Bronek
    Nov 9, 2020 at 23:19
  • 2
    Just a note that dotnet clean now is a command.
    – span
    Feb 12, 2021 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.