Today I want to talk about a small but useful feature that can save you some time when using Visual Studio: Build acceleration. It is a Visual Studio specific features that reduces the time required to build SDK-style .NET projects.
It uses a "fast up-to-date check" (FUTDC) to avoid calling MSBuild unless needed. This FUTDC can quickly determine if anything has changed in the project that would cause a build to be required.
The easiest way to enable this feature is by adding a Directory.Build.props file at the solution level(this setting will then be picked up by all your projects) with the following configuration:
(I already had a Directory.Build.props file so I just updated that one)
That’s all you need to do!
Of course maybe you don’t believe me that it works or you want to check what is going on. In that case you can enable logging:
- Go to Tools –> Options –> Projects and Solutions –> SDK-Style projects
- Change the Logging Level in the Up-to-date checks section to at least Minimal.
More information: project-system/docs/build-acceleration.md at main · dotnet/project-system (github.com)