diff --git a/src/SourceGenerators/Uno.UI.SourceGenerators/Content/Uno.UI.SourceGenerators.props b/src/SourceGenerators/Uno.UI.SourceGenerators/Content/Uno.UI.SourceGenerators.props index b059c43644d1..d0c3976ca896 100644 --- a/src/SourceGenerators/Uno.UI.SourceGenerators/Content/Uno.UI.SourceGenerators.props +++ b/src/SourceGenerators/Uno.UI.SourceGenerators/Content/Uno.UI.SourceGenerators.props @@ -7,7 +7,17 @@ <_isRoslynAnalyzerAvailable Condition="'$(MSBuildVersion)' >= '16.8'">true - <_canUseRoslynAnalyzer Condition="'$(LangVersion)' == 'preview' or ('$(LangVersion)'!='' and $(LangVersion.Contains('.')) and '$(LangVersion)'>='9.0')">true + + <_canUseRoslynAnalyzer Condition=" + '$(LangVersion)' == 'preview' + Or '$(LangVersion)' == 'latest' + Or '$(LangVersion)' == 'latestMajor' + Or '$(LangVersion)' == 'default' + Or ( + '$(LangVersion)'!='' + and $([MSBuild]::VersionGreaterThan($(LangVersion), '9.0')) + )">true + true false @@ -372,7 +382,7 @@ -