Invalidate project engine when UseRoslynTokenizer changes

This commit is contained in:
David Wengier 2024-10-25 14:53:08 +11:00
Родитель 1e660568b6
Коммит 6702e25e53
1 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -151,14 +151,15 @@ internal class ProjectState
else else
{ {
ProjectWorkspaceStateVersion = Version; ProjectWorkspaceStateVersion = Version;
}
if ((difference & ClearProjectWorkspaceStateVersionMask) != 0 && // CSharpLanguageVersion and UseRoslynTokenizer are part of the ProjectWorkspaceState, but they affect the project engine
CSharpLanguageVersion != older.CSharpLanguageVersion) // so we check for those specifically changing, and clear that.
{ if (CSharpLanguageVersion != older.CSharpLanguageVersion ||
// C# language version changed. This impacts the ProjectEngine, reset it. ProjectWorkspaceState.UseRoslynTokenizer != older.ProjectWorkspaceState.UseRoslynTokenizer)
_projectEngine = null; {
ConfigurationVersion = Version; _projectEngine = null;
ConfigurationVersion = Version;
}
} }
} }