Skip to content

Commit ef4543d

Browse files
committed
fix WinUI demo
1 parent 9f60091 commit ef4543d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

DevExpress.Mvvm.CodeGenerators.Tests/WinUITest/WinUITests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<Analyzer Include="..\..\DevExpress.Mvvm.CodeGenerators\bin\DevExpress.Mvvm.CodeGenerators.dll" />
1515
</ItemGroup>
1616
<ItemGroup>
17-
<Reference Include="DevExpress.Mvvm.v21.1">
18-
<HintPath>..\..\..\2021.1\Bin\WinUI\Sdk\Mvvm\DevExpress.Mvvm.v21.1.dll</HintPath>
17+
<Reference Include="DevExpress.WinUI.Mvvm.v22.1">
18+
<HintPath>..\..\..\2022.1\Bin\WinUI\Sdk\Mvvm\DevExpress.WinUI.Mvvm.v22.1.dll</HintPath>
1919
</Reference>
2020
</ItemGroup>
2121

DevExpress.Mvvm.CodeGenerators/Info/ContextInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public ContextInfo(GeneratorExecutionContext context, Compilation compilation) {
8181
};
8282

8383
public static bool GetIsWinUI(Compilation compilation) => GetIsDxMvvmAvailable(compilation) && compilation.GetTypeByMetadataName("DevExpress.Mvvm.POCO.ViewModelSource") == null;
84-
static bool GetIsDxMvvmAvailable(Compilation compilation) => compilation.ReferencedAssemblyNames.Any(ai => Regex.IsMatch(ai.Name, @"DevExpress\.Mvvm(\.v\d{2}\.\d)?$"));
84+
static bool GetIsDxMvvmAvailable(Compilation compilation) => compilation.ReferencedAssemblyNames.Any(ai => Regex.IsMatch(ai.Name, @"DevExpress\.(WinUI.)?Mvvm(\.v\d{2}\.\d)?$"));
8585
static bool GetIsPrismAvailable(Compilation compilation) => compilation.GetTypeByMetadataName("Prism.Commands.DelegateCommand") != null;
8686
public static List<SupportedMvvm> GetAvailableMvvm(Compilation compilation) {
8787
List<SupportedMvvm> available = new();

0 commit comments

Comments
 (0)