Search code examples
c#asp.netvisual-studio-2022code-snippets

Cannot get C# Snippets to work in Visual Studio 2022


I'm not 100% sure when this started happening, but now if I type 'if' and double tab, it just puts two spaces after the if and gives me an error code saying 'Command Handler 'Snippets' has exceeded allotted timeout and was auto canceled. This happens for all snippets that in C#. I have changed the setting in Text Editor > C# > IntelliSense and made it 'Always include snippets'. I have also tried a fresh install of VS 2022. Has anyone else run into this?enter image description here


Solution

  • It looks like this was caused when we updated to the newest version of Microsoft.Extensions.Caching.Memory using nuget. We were running version 5.0.0 and when we moved to 6.0.1 it caused a number of problems.