-
Notifications
You must be signed in to change notification settings - Fork 777
1029 update version number to 51 #1033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Updated `Microsoft.NET.Test.Sdk` to version `18.0.1` and `xunit` to version `2.9.3` across multiple test projects. Upgraded `xunit.runner.visualstudio` to version `3.1.5` for compatibility with the latest `xunit`. Aligned `Microsoft.Windows.SDK.BuildTools` in `Caliburn.Micro.WinUI3.csproj` to version `10.0.26100.6901`. Adjusted `<ItemGroup>` in `Caliburn.Micro.WinUI3.csproj` for better file organization. Retained or updated other dependencies like `coverlet.msbuild`, `coverlet.collector`, `Moq`, and `Xunit.StaFact` to ensure compatibility with the updated test framework versions. Improved project configuration and dependency management.
Updated the workflow to use 'dotnet msbuild' instead of 'msbuild' for various build and restore operations.
…/Caliburn-Micro/Caliburn.Micro into 1029-update-version-number-to-51
Introduced a new UWP project (`Caliburn.Micro.UWP`) with modern .NET features, including nullable reference types and AOT compatibility. Added a corresponding UWP test project. Removed Xamarin.Forms projects and all associated Android, iOS, and shared files, indicating a migration away from Xamarin.Forms. Updated the solution file to reflect these changes. Updated package versions for `System.Reactive`, `Autofac`, `FSharp.Core`, and others. Improved asynchronous handling in `App.xaml.cs`. Removed `global.json` to simplify SDK version management. Refactored the codebase to remove Xamarin.Forms-specific logic and dependencies, focusing on UWP, WinUI, Avalonia, and MAUI platforms.
Update features.dotnet to use .net 10
| { | ||
| var vmType = viewModel.GetType(); | ||
| if (vmType.FullName == "Microsoft.Expression.DesignModel.InstanceBuilders.DesignInstanceExtension") { | ||
| if (vmType.FullName == "Microsoft.Expression.DesignModel.InstanceBuilders.DesignInstanceExtension") |
Check warning
Code scanning / CodeQL
Erroneous class compare Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 days ago
To fix the issue, replace the string-based comparison vmType.FullName == "Microsoft.Expression.DesignModel.InstanceBuilders.DesignInstanceExtension" with a type-based comparison using object.GetType() == typeof(...). This ensures the check relies on actual type identity rather than a fragile string which could break if the class is renamed or moved.
Steps:
- Change line 226 in the file
src/Caliburn.Micro.Platform/ViewModelBinder.csfrom checkingvmType.FullName == ...tovmType == typeof(Microsoft.Expression.DesignModel.InstanceBuilders.DesignInstanceExtension). - Add
using Microsoft.Expression.DesignModel.InstanceBuilders;at the top of the file if it isn't already included, so that theDesignInstanceExtensiontype is available. - This requires no new methods or definitions, just a change to the comparison and possibly an import.
-
Copy modified lines R15-R16 -
Copy modified line R228
| @@ -12,6 +12,8 @@ | ||
| #if MAUI | ||
| using UIElement = global::Microsoft.Maui.Controls.Element; | ||
| using FrameworkElement = global::Microsoft.Maui.Controls.VisualElement; | ||
| #else | ||
| using Microsoft.Expression.DesignModel.InstanceBuilders; | ||
| using DependencyProperty = global::Microsoft.Maui.Controls.BindableProperty; | ||
| using DependencyObject = global::Microsoft.Maui.Controls.BindableObject; | ||
| #elif WINDOWS_UWP | ||
| @@ -223,7 +225,7 @@ | ||
| if (View.InDesignMode) | ||
| { | ||
| var vmType = viewModel.GetType(); | ||
| if (vmType.FullName == "Microsoft.Expression.DesignModel.InstanceBuilders.DesignInstanceExtension") | ||
| if (vmType == typeof(DesignInstanceExtension)) | ||
| { | ||
| var propInfo = vmType.GetProperty("Instance", BindingFlags.Instance | BindingFlags.NonPublic); | ||
| viewModel = propInfo.GetValue(viewModel, null); |
This pull request updates versioning and package dependencies across multiple projects in the solution. The main changes include bumping the
Nerdbank.GitVersioningpackage to a newer version and incrementing the project version numbers to5.1-beta. Additionally, the WinUI3 project receives an update to its WindowsAppSDK dependency.Versioning and package updates:
Nerdbank.GitVersioningversion3.9.50instead of3.7.112for consistent version management. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]version.jsonand platform-specificversion.jsonfiles have been updated to set the version to5.1-beta. [1] [2]Microsoft.WindowsAppSDKversion1.8.251106002, up from a preview version, for improved compatibility and features.Dependency management:
Microsoft.SourceLink.GitHubandNerdbank.GitVersioningpackage references to the WinUI3 project for consistency.