From 7977a38ebc3f7bce3dd656b0eff3a4dd69d1f611 Mon Sep 17 00:00:00 2001 From: Adrian Hall Date: Tue, 11 Feb 2025 14:07:05 -0800 Subject: [PATCH 1/2] (#274) Avalonia update to .NET 9 --- samples/todoapp/TodoApp.Avalonia/Directory.Build.props | 2 +- .../TodoApp.Avalonia.Android.csproj | 4 ++-- .../TodoApp.Avalonia.Desktop.csproj | 2 +- .../TodoApp.Avalonia.iOS/TodoApp.Avalonia.iOS.csproj | 4 ++-- samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.sln | 6 ------ .../TodoApp.Avalonia/TodoApp.Avalonia.csproj | 10 +++++----- ...DesingTimeViewModels.cs => DesignTimeViewModels.cs} | 0 .../TodoApp.Avalonia/ViewModels/TodoListViewModel.cs | 6 +++--- 8 files changed, 14 insertions(+), 20 deletions(-) rename samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/ViewModels/{DesingTimeViewModels.cs => DesignTimeViewModels.cs} (100%) diff --git a/samples/todoapp/TodoApp.Avalonia/Directory.Build.props b/samples/todoapp/TodoApp.Avalonia/Directory.Build.props index 89dc4436..f904c1fc 100644 --- a/samples/todoapp/TodoApp.Avalonia/Directory.Build.props +++ b/samples/todoapp/TodoApp.Avalonia/Directory.Build.props @@ -1,6 +1,6 @@ enable - 11.1.0 + 11.2.3 diff --git a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.Android/TodoApp.Avalonia.Android.csproj b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.Android/TodoApp.Avalonia.Android.csproj index ebf47e8e..5a7d5c52 100644 --- a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.Android/TodoApp.Avalonia.Android.csproj +++ b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.Android/TodoApp.Avalonia.Android.csproj @@ -1,8 +1,8 @@ Exe - net8.0-android - 21 + net9.0-android + 34 enable com.CompanyName.TodoApp.Avalonia 1 diff --git a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.Desktop/TodoApp.Avalonia.Desktop.csproj b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.Desktop/TodoApp.Avalonia.Desktop.csproj index 361d6bce..639fe2be 100644 --- a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.Desktop/TodoApp.Avalonia.Desktop.csproj +++ b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.Desktop/TodoApp.Avalonia.Desktop.csproj @@ -3,7 +3,7 @@ WinExe - net8.0 + net9.0 enable true diff --git a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.iOS/TodoApp.Avalonia.iOS.csproj b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.iOS/TodoApp.Avalonia.iOS.csproj index abf3b43c..1f2c8ef4 100644 --- a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.iOS/TodoApp.Avalonia.iOS.csproj +++ b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.iOS/TodoApp.Avalonia.iOS.csproj @@ -1,8 +1,8 @@  Exe - net8.0-ios - 13.0 + net9.0-ios + 15.0 enable diff --git a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.sln b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.sln index 7499ac80..4c96edde 100644 --- a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.sln +++ b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.sln @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoApp.Avalonia", "TodoApp EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoApp.Avalonia.Desktop", "TodoApp.Avalonia.Desktop\TodoApp.Avalonia.Desktop.csproj", "{ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoApp.Avalonia.Browser", "TodoApp.Avalonia.Browser\TodoApp.Avalonia.Browser.csproj", "{1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoApp.Avalonia.iOS", "TodoApp.Avalonia.iOS\TodoApp.Avalonia.iOS.csproj", "{EBD9022F-BC83-4846-9A11-6F7F3772DC64}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoApp.Avalonia.Android", "TodoApp.Avalonia.Android\TodoApp.Avalonia.Android.csproj", "{7AD1DAC8-7FBE-49D5-8614-7321233DB82E}" @@ -32,10 +30,6 @@ Global {ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}.Release|Any CPU.Build.0 = Release|Any CPU - {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Release|Any CPU.Build.0 = Release|Any CPU {EBD9022F-BC83-4846-9A11-6F7F3772DC64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EBD9022F-BC83-4846-9A11-6F7F3772DC64}.Debug|Any CPU.Build.0 = Debug|Any CPU {EBD9022F-BC83-4846-9A11-6F7F3772DC64}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/TodoApp.Avalonia.csproj b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/TodoApp.Avalonia.csproj index adfa69b2..5183165e 100644 --- a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/TodoApp.Avalonia.csproj +++ b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/TodoApp.Avalonia.csproj @@ -1,8 +1,8 @@  - net8.0 + net9.0 enable - latest + preview true @@ -16,8 +16,8 @@ - - - + + + diff --git a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/ViewModels/DesingTimeViewModels.cs b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/ViewModels/DesignTimeViewModels.cs similarity index 100% rename from samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/ViewModels/DesingTimeViewModels.cs rename to samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/ViewModels/DesignTimeViewModels.cs diff --git a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/ViewModels/TodoListViewModel.cs b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/ViewModels/TodoListViewModel.cs index 2ff98da2..1c66e3d4 100644 --- a/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/ViewModels/TodoListViewModel.cs +++ b/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia/ViewModels/TodoListViewModel.cs @@ -22,13 +22,13 @@ public partial class TodoListViewModel(AppDbContext context) : ViewModelBase, ID /// Gets or sets if the data is currently being refreshed. /// [ObservableProperty] - private bool isRefreshing; + public partial bool IsRefreshing { get; set; } /// /// Gets or sets a collection of s /// [ObservableProperty] - private ConcurrentObservableCollection items = []; + public partial ConcurrentObservableCollection Items { get; set; } = []; // -- Adding new Items -- @@ -68,7 +68,7 @@ private async Task AddItemAsync(CancellationToken cancellationToken) /// [ObservableProperty] [NotifyCanExecuteChangedFor(nameof(AddItemCommand))] // This attribute will invalidate the command each time this property changes - private string? _newItemContent; + public partial string? NewItemContent { get; set; } /// /// Returns true if a new Item can be added. We require to have the NewItem some text. From 6ca10c5f97b588516e77172181070d51741c7b01 Mon Sep 17 00:00:00 2001 From: Adrian Hall Date: Thu, 13 Feb 2025 14:29:09 -0800 Subject: [PATCH 2/2] (#269) Fix for build problems. Inherit settings between prod and dev --- mkdocs.production.yml | 71 +------------------------------------------ mkdocs.shared.yml | 63 ++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 65 +-------------------------------------- 3 files changed, 65 insertions(+), 134 deletions(-) create mode 100644 mkdocs.shared.yml diff --git a/mkdocs.production.yml b/mkdocs.production.yml index 5bbadc9f..3401fda7 100644 --- a/mkdocs.production.yml +++ b/mkdocs.production.yml @@ -1,74 +1,5 @@ +INHERIT: ./mkdocs.shared.yml site_name: Datasync Community Toolkit site_url: https://CommunityToolkit.github.io/Datasync/ repo_url: https://github.com/CommunityToolkit/Datasync/ repo_name: GitHub - -theme: - name: readthedocs - highlightjs: true - locale: en - -validation: - omitted_files: warn - absolute_links: warn - unrecognized_links: warn - anchors: warn - -markdown_extensions: - - smarty: {} - - toc: - permalink: "#" - - sane_lists: {} - - fenced_code: {} - - tables: {} - - admonition: {} - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name: mermaid2.fence_mermaid_custom - -plugins: - - search - - mermaid2 - -nav: - - Getting started: index.md - - Tutorial: - - Server: - - "The basics": tutorial/server/part-1.md - - "Standard repositories": tutorial/server/part-2.md - - "Custom repositories": tutorial/server/part-3.md - - "Access control": tutorial/server/part-4.md - - "Real-time updates": tutorial/server/part-5.md - - In depth: - - Server: - - The basics: in-depth/server/index.md - - Databases: - - Azure SQL: in-depth/server/db/azuresql.md - - Cosmos: in-depth/server/db/cosmos.md - - In Memory: in-depth/server/db/in-memory.md - - LiteDb: in-depth/server/db/litedb.md - - MongoDb: in-depth/server/db/mongodb.md - - MySQL: in-depth/server/db/mysql.md - - PgSQL: in-depth/server/db/pgsql.md - - SQLite: in-depth/server/db/sqlite.md - - OpenApi: - - NSwag: in-depth/server/openapi/nswag.md - - Swashbuckle: in-depth/server/openapi/swashbuckle.md - - ".NET 9.x": in-depth/server/openapi/net9.md - - Client: - - The basics: in-depth/client/index.md - - Authentication: in-depth/client/auth.md - - Online operations: in-depth/client/online.md - - Advanced topics: - - MAUI AOT: in-depth/client/advanced/maui-aot.md - - Samples: - - Todo App: - - The server: samples/todoapp/server.md - - Avalonia: samples/todoapp/avalonia.md - - MAUI: samples/todoapp/maui.md - - WinUI3: samples/todoapp/winui3.md - - WPF: samples/todoapp/wpf.md - - diff --git a/mkdocs.shared.yml b/mkdocs.shared.yml new file mode 100644 index 00000000..6c6dcb1b --- /dev/null +++ b/mkdocs.shared.yml @@ -0,0 +1,63 @@ +theme: + name: readthedocs + highlightjs: true + locale: en + +validation: + omitted_files: warn + absolute_links: warn + unrecognized_links: warn + anchors: warn + +plugins: + - search + - mermaid2 + +markdown_extensions: + - smarty: {} + - toc: + permalink: "#" + - sane_lists: {} + - fenced_code: {} + - tables: {} + - admonition: {} + - pymdownx.superfences: {} + +nav: + - Getting started: index.md + - Tutorial: + - Server: + - "The basics": tutorial/server/part-1.md + - "Standard repositories": tutorial/server/part-2.md + - "Custom repositories": tutorial/server/part-3.md + - "Access control": tutorial/server/part-4.md + - "Real-time updates": tutorial/server/part-5.md + - In depth: + - Server: + - The basics: in-depth/server/index.md + - Databases: + - Azure SQL: in-depth/server/db/azuresql.md + - Cosmos: in-depth/server/db/cosmos.md + - In Memory: in-depth/server/db/in-memory.md + - LiteDb: in-depth/server/db/litedb.md + - MongoDb: in-depth/server/db/mongodb.md + - MySQL: in-depth/server/db/mysql.md + - PgSQL: in-depth/server/db/pgsql.md + - SQLite: in-depth/server/db/sqlite.md + - OpenApi: + - NSwag: in-depth/server/openapi/nswag.md + - Swashbuckle: in-depth/server/openapi/swashbuckle.md + - ".NET 9.x": in-depth/server/openapi/net9.md + - Client: + - The basics: in-depth/client/index.md + - Authentication: in-depth/client/auth.md + - Online operations: in-depth/client/online.md + - Advanced topics: + - MAUI AOT: in-depth/client/advanced/maui-aot.md + - Samples: + - Todo App: + - The server: samples/todoapp/server.md + - Avalonia: samples/todoapp/avalonia.md + - MAUI: samples/todoapp/maui.md + - WinUI3: samples/todoapp/winui3.md + - WPF: samples/todoapp/wpf.md diff --git a/mkdocs.yml b/mkdocs.yml index c00e7e12..9fec39a6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,66 +1,3 @@ +INHERIT: ./mkdocs.shared.yml site_name: Datasync Community Toolkit dev_addr: localhost:7000 - -theme: - name: readthedocs - highlightjs: true - locale: en - -validation: - omitted_files: warn - absolute_links: warn - unrecognized_links: warn - anchors: warn - -markdown_extensions: - - smarty: {} - - toc: - permalink: "#" - - sane_lists: {} - - fenced_code: {} - - tables: {} - - admonition: {} - - pymdownx.superfences: {} - -plugins: - - search - - mermaid2 - -nav: - - Getting started: index.md - - Tutorial: - - Server: - - "The basics": tutorial/server/part-1.md - - "Standard repositories": tutorial/server/part-2.md - - "Custom repositories": tutorial/server/part-3.md - - "Access control": tutorial/server/part-4.md - - "Real-time updates": tutorial/server/part-5.md - - In depth: - - Server: - - The basics: in-depth/server/index.md - - Databases: - - Azure SQL: in-depth/server/db/azuresql.md - - Cosmos: in-depth/server/db/cosmos.md - - In Memory: in-depth/server/db/in-memory.md - - LiteDb: in-depth/server/db/litedb.md - - MongoDb: in-depth/server/db/mongodb.md - - MySQL: in-depth/server/db/mysql.md - - PgSQL: in-depth/server/db/pgsql.md - - SQLite: in-depth/server/db/sqlite.md - - OpenApi: - - NSwag: in-depth/server/openapi/nswag.md - - Swashbuckle: in-depth/server/openapi/swashbuckle.md - - ".NET 9.x": in-depth/server/openapi/net9.md - - Client: - - The basics: in-depth/client/index.md - - Authentication: in-depth/client/auth.md - - Online operations: in-depth/client/online.md - - Advanced topics: - - MAUI AOT: in-depth/client/advanced/maui-aot.md - - Samples: - - Todo App: - - The server: samples/todoapp/server.md - - Avalonia: samples/todoapp/avalonia.md - - MAUI: samples/todoapp/maui.md - - WinUI3: samples/todoapp/winui3.md - - WPF: samples/todoapp/wpf.md