adamralph / minver

🏷 Minimalistic versioning using Git tags.
Apache License 2.0
844 stars 59 forks source link

MSBuild caching #1021

Closed adamralph closed 4 weeks ago

adamralph commented 1 month ago

With this change, the version is calculated once (per thread used by the SDK) and then cached.

For solutions with many projects, this can significantly reduce build time.

adamralph commented 1 month ago

@bording what do you think of this as a lightweight alternative to #989?

I was thinking it would be nice if MSBuild exposed tasks which could read and write from the build cache, so I went ahead and wrote those tasks. I could even see those potentially being contributed to MSBuild.

adamralph commented 1 month ago

FWIW, I tested this with https://github.com/Particular/ServiceControl, and a single threaded build went from 43 seconds to 24 seconds.

adamralph commented 1 month ago

testing the water with https://github.com/dotnet/msbuild/pull/10418

adamralph commented 4 weeks ago

@bording I've released this in 5.1.0-rc.1—please feel free to give it a try.

adamralph commented 4 weeks ago

re-released as 6.0.0-rc.1 because the next release contains at least one breaking change