"Value does not fall within the expected range" error when editing XAML with VS 2022

Felgryn 0 Reputation points
2025-03-01T02:31:13.1333333+00:00

Hi,

I'm using Visual Studio 2022 to develop some WPF/XAML applications - i've previously been developing C# and python - and am now seeing an intermittent error when editing XAML files that i have not seen before:

A popup that says: "Value does not fall within the expected range"

VS then freezes and crashes. I find if i try and perform the same edit again, i can crash VS at the same place.

Removing the .vs seems to recover the system - but after some editing, this error pops up again fairly consistently.

I'm on version 17.12.5 - working with XAML with C# code behind. I am only finding this issue during editing of XAML files.

Any suggestions?

Cheers!

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
360 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.