My proposal is that this path can be set using an override to a different path.
In Gitlab, when building dotnet source, you need to do the begin, compile and end steps all in one job. There is no way to do these in different steps because it’s not possible to save the cache directory as artifacts in GitLab so a next job can use it and continue with the process.
I’m confused. You filed this in SonarLint / IntelliJ Platform. And it seems that you’re actually making a suggestion about the SonarScanner for MSBuild?
Yes I noticed that, but the filters didn’t bring up anything for dotnet/msbuild. The links from the Github repo also points to here. I’d be happy if this could be moved.
Yes we are using the latest version. Unfortunately the temp path is hard coded, as linked in my original post, so we can’t change where the temporary files are stored being used for the analysis and the end-lint process.
We want the resource cache to be in a well-known location so we can re-use files that have
already been installed (although this won’t help for e.g. hosted build agents)
I don’t know enough of the code base to try and make a change, but according to the comment, this is a known issue. It would be great if this could be changed via configuration somehow to help make this work better on hosted build agents.
The latest, 5.15 release of the MSBuild Scanner for .NET now supports the sonar.plugin.cache.directory option to indicate a specific path for the cache location.