Add *.lscache to VisualStudio.gitignore
Reasons for making this change
The C# Dev Kit create *.csproj.lscache in new version.
Links to documentation supporting these rule changes
Said by *.csproj.lscache
# This file caches language service data to improve the performance of C# Dev Kit.
# It is not intended for manual editing. It can safely be deleted and will be
# regenerated automatically.
#
# To exclude from version control, add *.lscache to your .gitignore file.
Merge and Approval Steps
- [x] Confirm that you've read the contribution guidelines and ensured your PR aligns
- [ ] Ensure CI is passing
- [ ] Get a review and Approval from one of the maintainers
I'm open to discussion on this one, but I do think we shouldn't ignore any files by default that the maintainers of the tooling intend to be included in source control.
This file contains a lot of local things such as /platform:x64 or <DOTNET>/sdk/10.0.300-preview.0.26177.108/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_default.globalconfig. It maybe changed every time when open the project on different devices. It should be treated like *.csproj.user which is related to local environments.
@dooleydevin This was officially ignored https://github.com/dotnet/sdk/pull/53752
Ignore it!
ok will respond later
On Fri, May 15, 2026 at 11:09 AM where where @.***> wrote:
wherewhere left a comment (github/gitignore#4839) https://github.com/github/gitignore/pull/4839#issuecomment-4459204703
Ignore it!
— Reply to this email directly, view it on GitHub https://github.com/github/gitignore/pull/4839#issuecomment-4459204703, or unsubscribe https://github.com/notifications/unsubscribe-auth/B4CX3QAMOX67PQBBP72MZ3T4233FBAVCNFSM6AAAAACXPEUVKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DINJZGIYDINZQGM . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
received appreciate it
On Fri, May 15, 2026 at 11:09 AM where where @.***> wrote:
wherewhere left a comment (github/gitignore#4839) https://github.com/github/gitignore/pull/4839#issuecomment-4459204703
Ignore it!
— Reply to this email directly, view it on GitHub https://github.com/github/gitignore/pull/4839#issuecomment-4459204703, or unsubscribe https://github.com/notifications/unsubscribe-auth/B4CX3ZZLMHRA3CNFVWGU5X34233FBAVCNFSM6AAAAACXPEUVKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DINJZGIYDINZQGM . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
got the message thanks
On Fri, May 15, 2026 at 3:05 PM twubndgsijlc-netizen < @.***> wrote:
twubndgsijlc-netizen left a comment (github/gitignore#4839) https://github.com/github/gitignore/pull/4839#issuecomment-4460910927 received appreciate it
On Fri, May 15, 2026 at 11:09 AM where where @.***> wrote:
wherewhere left a comment (github/gitignore#4839) https://github.com/github/gitignore/pull/4839#issuecomment-4459204703
Ignore it!
— Reply to this email directly, view it on GitHub https://github.com/github/gitignore/pull/4839#issuecomment-4459204703,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/B4CX3ZZLMHRA3CNFVWGU5X34233FBAVCNFSM6AAAAACXPEUVKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DINJZGIYDINZQGM>
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/github/gitignore/pull/4839#issuecomment-4460910927, or unsubscribe https://github.com/notifications/unsubscribe-auth/B4CX3QDTZC334LJXRMTX34D424W2HAVCNFSM6AAAAACXPEUVKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DINRQHEYTAOJSG4 . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
Reasons for making this change
The C# Dev Kit create
*.csproj.lscachein new version.Links to documentation supporting these rule changes
Said by
*.csproj.lscache# This file caches language service data to improve the performance of C# Dev Kit. # It is not intended for manual editing. It can safely be deleted and will be # regenerated automatically. # # To exclude from version control, add *.lscache to your .gitignore file.Merge and Approval Steps
- [x] Confirm that you've read the contribution guidelines and ensured your PR aligns
- [ ] Ensure CI is passing
- [ ] Get a review and Approval from one of the maintainers
Don't work
Hey folks, I still think the point I made in https://github.com/github/gitignore/pull/4839#discussion_r3103741566 is valid, and this shouldn't be ignored by default.
Per our contribution guidelines, we don't ignore anything that developers may reasonably want to include in their source control. Even if many developers do prefer to ignore it, these templates get used by a lot of teams and should attempt to be compatible with all intended workflows.
Like I said in my review, an owner of the project specifically said they encourage it to be checked into source control, so ignoring this by default would go against our guidelines:
What if I don't want them in source control?
We'd encourage you to try checking them in and experience the benefits, but we understand not every team will want that. You can add .lscache to your .gitignore if you prefer. You'll still get the per-machine caching benefits (warm starts when reopening the same project), you just won't get the cross-machine and branch-switching benefits. We're exploring configuration options to give users more control here.
It looks like this is starting to get a lot of attention because of an accidental change to how these are generated by default. I'd suggest that everyone impacted who does not want these committed add it to the .gitignore files they use, and @wherewhere can update the template to include a commented version of this and a descriptor of why someone might ignore it.
This is the same approach that we've taken elsewhere in this repository. I believe this section of the Python.gitignore file is one of the better examples: https://github.com/github/gitignore/blob/main/Python.gitignore#L86
Bad, I will add comment :(
Same here. These files add no value in VCS, cause everyone on our team has different setups
Sample of an .lscache file produced on my system (Linux nixos 6.12.87)
[analyzerReferences]
../../../../../../../nix/store/0r8iidkhy8ky5nak95nsl3x05i33qbdb-dotnet-combined/share/dotnet/packs/Microsoft.AspNetCore.App.Ref/8.0.26/analyzers/dotnet/cs/
Microsoft.AspNetCore.App.Analyzers.dll
Microsoft.AspNetCore.App.CodeFixes.dll
Microsoft.AspNetCore.Components.Analyzers.dll
../../../../../../../nix/store/0r8iidkhy8ky5nak95nsl3x05i33qbdb-dotnet-combined/share/dotnet/packs/Microsoft.AspNetCore.App.Ref/8.0.26/analyzers/dotnet/roslyn4.4/cs/
Microsoft.Extensions.Logging.Generators.dll
Microsoft.Extensions.Options.SourceGeneration.dll
../../../../../../../nix/store/0r8iidkhy8ky5nak95nsl3x05i33qbdb-dotnet-combined/share/dotnet/packs/Microsoft.NETCore.App.Ref/8.0.26/analyzers/dotnet/cs/
Microsoft.Interop.ComInterfaceGenerator.dll
Microsoft.Interop.JavaScript.JSImportGenerator.dll
Microsoft.Interop.LibraryImportGenerator.dll
Microsoft.Interop.SourceGeneration.dll
System.Text.Json.SourceGeneration.dll
System.Text.RegularExpressions.Generator.dll
../../../../../../../nix/store/0r8iidkhy8ky5nak95nsl3x05i33qbdb-dotnet-combined/share/dotnet/sdk/8.0.420/Sdks/Microsoft.NET.Sdk/analyzers/
Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll
Microsoft.CodeAnalysis.NetAnalyzers.dll
<NUGET>/awssdk.apigateway/3.7.300.71/analyzers/dotnet/cs/
AWSSDK.APIGateway.CodeAnalysis.dll
SharedAnalysisCode.dll
<NUGET>/microsoft.codeanalysis.analyzers/3.3.3/analyzers/dotnet/cs/
Microsoft.CodeAnalysis.Analyzers.dll
Microsoft.CodeAnalysis.CSharp.Analyzers.dll
<NUGET>/microsoft.entityframeworkcore.analyzers/8.0.2/analyzers/dotnet/cs/Microsoft.EntityFrameworkCore.Analyzers.dll
[analyzerConfigFiles]
../../../../../../../nix/store/0r8iidkhy8ky5nak95nsl3x05i33qbdb-dotnet-combined/share/dotnet/sdk/8.0.420/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_8_default.globalconfig
obj/Debug/net8.0/Workflow.GeneratedMSBuildEditorConfig.editorconfig
Those ../nix/store/ paths won't exist unless the system is built from the same configuration with same packages versions
Another issue for moving it to $HOME/.cache https://github.com/microsoft/vscode-dotnettools/issues/2952