From 3aee0fcf1b7569b6f9b67c02d5e654f4dbe91ee2 Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 23 Sep 2024 01:42:50 +0100 Subject: [PATCH] fix missing versions in Directory.Build.props --- BlazorBindings.Avalonia.sln | 1 + Directory.Packages.props | 3 ++- .../BlazorBindings.Avalonia.ComponentGenerator.csproj | 2 +- .../GeneratedPropertyInfo.EventCallback.cs | 4 ++-- src/Directory.Build.props | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/BlazorBindings.Avalonia.sln b/BlazorBindings.Avalonia.sln index fb7f385f..a414ba51 100644 --- a/BlazorBindings.Avalonia.sln +++ b/BlazorBindings.Avalonia.sln @@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Readme.md = Readme.md THIRD-PARTY-NOTICES.txt = THIRD-PARTY-NOTICES.txt version.json = version.json + Directory.Packages.props = Directory.Packages.props EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{175AB6E2-5FB5-4C15-94C2-DCA2EE6B0703}" diff --git a/Directory.Packages.props b/Directory.Packages.props index 9b4e0628..74f6f3b2 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,6 +1,5 @@ - 11.1.3 @@ -27,5 +26,7 @@ + + \ No newline at end of file diff --git a/src/BlazorBindings.Avalonia.ComponentGenerator/BlazorBindings.Avalonia.ComponentGenerator.csproj b/src/BlazorBindings.Avalonia.ComponentGenerator/BlazorBindings.Avalonia.ComponentGenerator.csproj index 20912c12..43a80108 100644 --- a/src/BlazorBindings.Avalonia.ComponentGenerator/BlazorBindings.Avalonia.ComponentGenerator.csproj +++ b/src/BlazorBindings.Avalonia.ComponentGenerator/BlazorBindings.Avalonia.ComponentGenerator.csproj @@ -6,7 +6,7 @@ Dotnet tool which generate BlazorBindings.Avalonia components for Avalonia elements. true - dotnet-generate-maui-blazor-components + dotnet-generate-avalonia-blazor-components blazor;blazorbindings diff --git a/src/BlazorBindings.Avalonia.ComponentGenerator/GeneratedPropertyInfo.EventCallback.cs b/src/BlazorBindings.Avalonia.ComponentGenerator/GeneratedPropertyInfo.EventCallback.cs index 75c4cf85..e3fcc5dd 100644 --- a/src/BlazorBindings.Avalonia.ComponentGenerator/GeneratedPropertyInfo.EventCallback.cs +++ b/src/BlazorBindings.Avalonia.ComponentGenerator/GeneratedPropertyInfo.EventCallback.cs @@ -56,9 +56,9 @@ private string GetLocalHandlerFunctionBody() { var componentPropertyTypeNullable = GetComponentPropertyTypeName(_bindedProperty, ContainingType, makeNullable: true); var componentPropertyType = GetComponentPropertyTypeName(_bindedProperty, ContainingType, makeNullable: false); - var mauiPropertyType = GetTypeNameAndAddNamespace(_bindedProperty.Type); + var avaloniaPropertyType = GetTypeNameAndAddNamespace(_bindedProperty.Type); - argument = componentPropertyTypeNullable == mauiPropertyType + argument = componentPropertyTypeNullable == avaloniaPropertyType ? $"NativeControl.{_bindedProperty.Name}" : $"NativeControl.{_bindedProperty.Name} is {componentPropertyType} item ? item : default({componentPropertyTypeNullable})"; } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index c16b4cee..1de356d9 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -2,8 +2,9 @@ + 11.1.3 12.0 - enable + true $(NoWarn);CS1591;CA1303 true