msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

SDK resolvers should have an API to clear state

Open jeffkl opened this issue 2 years ago • 2 comments

SDK resolvers have caches because they depend on certain things such as files on disk to determine paths to SDKs. In order to make the cache more effective, SDK resolvers can make these caches static so they can be re-used by evaluations within the same process, especially Visual Studio. However, a long lived process like devenv.exe can cause these caches to potentially grow. It would be good if MSBuild had an API that could tell SDK resolvers to clear their state. For example, in Visual Studio when you close a solution, the SDK resolvers' caches could be cleared.

jeffkl avatar Aug 24 '23 18:08 jeffkl

Team triage: @baronfel what do you think?

AR-May avatar May 28 '24 13:05 AR-May

This seems like a good thing to have - it appears we designed the resolver mechanism with relatively short lived clients in mind, but VS (and the MSBuild Server Daemon) are a different use case entirely.

baronfel avatar May 28 '24 14:05 baronfel