Skip to content

Add .lscache from c# dev kit got VisualStudio.gitignore#4862

Closed
tiger31 wants to merge 1 commit into
github:mainfrom
tiger31:main
Closed

Add .lscache from c# dev kit got VisualStudio.gitignore#4862
tiger31 wants to merge 1 commit into
github:mainfrom
tiger31:main

Conversation

@tiger31
Copy link
Copy Markdown

@tiger31 tiger31 commented May 18, 2026

Link to the application or project's homepage

C# Dev Kit VSCode Extension

Reasons for making this change

Those cache files are not valid for cross-platform build, especially on NixOS systems

Links to documentation supporting these rule changes

vscode-dotnettools repo discussion
It's the same place https://aka.ms/lscache redirects

Merge and Approval Steps

@tiger31 tiger31 requested a review from a team as a code owner May 18, 2026 13:17
@tiger31
Copy link
Copy Markdown
Author

tiger31 commented May 18, 2026

To add more context:

In their issue they state:

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.

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

@tiger31 tiger31 closed this May 18, 2026
@tiger31
Copy link
Copy Markdown
Author

tiger31 commented May 18, 2026

Duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant