Skip to content

Commit

Permalink
net9ify - updates and remove some old stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Dec 15, 2024
1 parent ba71f67 commit a557c7c
Show file tree
Hide file tree
Showing 20 changed files with 48 additions and 280 deletions.

This file was deleted.

8 changes: 0 additions & 8 deletions ProjectTemplates/SharedProject/.template.config/ide.host.json

This file was deleted.

Binary file not shown.
15 changes: 0 additions & 15 deletions ProjectTemplates/SharedProject/.template.config/template.json

This file was deleted.

7 changes: 0 additions & 7 deletions ProjectTemplates/SharedProject/Class1.cs

This file was deleted.

14 changes: 0 additions & 14 deletions ProjectTemplates/SharedProject/SharedProject.projitems

This file was deleted.

13 changes: 0 additions & 13 deletions ProjectTemplates/SharedProject/SharedProject.shproj

This file was deleted.

8 changes: 1 addition & 7 deletions ProjectTemplates/ShinyApp/.template.config/ide.host.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@
},
"isVisible": true
},
{
"id": "shinyframework",
"name": {
"text": "Add Shiny Framework (Shiny + ReactiveUI + Prism)"
},
"isVisible": true
},

{
"id": "prism",
"name": {
Expand Down
11 changes: 0 additions & 11 deletions ProjectTemplates/ShinyApp/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@
"format": "D"
}
},
"shinyframework": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "FRAMEWORK - Add Shiny Framework by Allan Ritchie - Documentation https://github.com/shinyorg/framework - Lots of helpful services like navigation, zero boilerplate MVVM properties, viewmodel validation, localization, viewmodel lifecycles, dialog services, and more",
"displayName": "FRAMEWORK - Add Shiny Framework (Shiny + ReactiveUI + Prism)"
},
"prism":{
"type": "parameter",
"datatype": "bool",
Expand Down Expand Up @@ -840,10 +833,6 @@
"condition": "(sqlite == false)",
"exclude": "Services/MySqliteConnection.cs"
},
{
"condition": "(shinyframework == false)",
"exclude": "FodyWeavers.xml"
},
{
"condition": "(authservice == false)",
"exclude": "Services/IAuthenticationService.cs"
Expand Down
39 changes: 10 additions & 29 deletions ProjectTemplates/ShinyApp/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ _Microsoft Application User Interface Library_
* [Documentation](https://learn.microsoft.com/en-us/dotnet/maui/)
* [GitHub](https://github.com/dotnet/maui)

## Shiny

_A cross platform framework designed to make working with device services and background processes easy, testable, and consistent while bringing things like dependency injection & logging in a structured way to your code! - Written by Allan Ritchie_

* [Documentation](https://shinylib.net/)
* [GitHub](https://github.com/shinyorg/shiny)

<!--#if (useblazor)-->
## .NET Blazor
Blazor is a .NET frontend web framework that supports both server-side rendering and client interactivity in a single programming model:
Expand All @@ -18,13 +25,6 @@ Blazor is a .NET frontend web framework that supports both server-side rendering
* [Documentation](https://learn.microsoft.com/en-us/aspnet/core/blazor/)

<!--#endif-->
## Shiny

_A cross platform framework designed to make working with device services and background processes easy, testable, and consistent while bringing things like dependency injection & logging in a structured way to your code! - Written by Allan Ritchie_

* [Documentation](https://shinylib.net/)
* [GitHub](https://github.com/shinyorg/shiny)

<!--#if (shinymediator)-->
## Shiny Mediator

Expand Down Expand Up @@ -65,18 +65,7 @@ Reference Implementation - Lean and performant, providing implementations for in

<!--#endif-->

<!--#if (shinyframework)-->
## Prism Library

_Framework combines the best of MVVM using Prism & ReactiveUI while also combining Shiny. - Written by Allan Ritchie_

* [Documentation](https://github.com/shinyorg/framework)
* Third Party Libraries
* [ReactiveUI](https://reactiveui.net)
* [Prism](https://prismlibrary.com)
* [DryIoc](https://github.com/dadhi/DryIoc)
<!--#endif-->
<!--#if (shinyframework || prism)-->
<!--#if (prism)-->
## Prism Library

_Empower Your XAML Applications. Leverage the power of the Prism Library to build robust and maintainable WPF, Uno Platform, .NET MAUI and Xamarin.Forms applications with ease. Written by Dan Siegel & Brian Lagunas_
Expand All @@ -85,7 +74,7 @@ _Empower Your XAML Applications. Leverage the power of the Prism Library to buil
* [Container Extension Library - DryIoc](https://github.com/dadhi/DryIoc)

<!--#endif-->
<!--#if (reactiveui || shinyframework)-->
<!--#if (reactiveui)-->
## ReactiveUI

ReactiveUI is a composable, cross-platform model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming, which is a paradigm that allows you to abstract mutable state away from your user interfaces and express the idea around a feature in one readable place and improve the testability of your application.
Expand All @@ -94,15 +83,7 @@ ReactiveUI is a composable, cross-platform model-view-viewmodel framework for al
* [GitHub](https://github.com/reactiveui/ReactiveUI)

<!--#endif-->
<!--#if (health)-->
## Shiny Health

_Apple Health & Google Fit for your .NET MAUI apps - Written by Allan Ritchie_

* [GitHub](https://github.com/shinyorg/health)

<!--#endif-->
<!--#if (shinyframework || communitytoolkit)-->
<!--#if (communitytoolkit)-->
## MAUI Community Toolkit

_A collection of reusable elements for application development with .NET MAUI, including animations, behaviors, converters, effects, and helpers. It simplifies and demonstrates common developer tasks when building iOS, Android, macOS and WinUI applications._
Expand Down
4 changes: 2 additions & 2 deletions ProjectTemplates/ShinyApp/MainViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace ShinyApp;

#if shinyframework
#if reactiveui
public class MainViewModel : ViewModel
{
public MainViewModel(BaseServices services) : base(services) {}


[Reactive] public string Property { get; set; }
[Reactive] string property;
}
#elif ctmvvm
public partial class MainViewModel : ObservableObject
Expand Down
29 changes: 5 additions & 24 deletions ProjectTemplates/ShinyApp/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#if camera
using Camera.MAUI;
#endif
#if shinyframework || communitytoolkit || mediaelement
#if communitytoolkit || mediaelement
using CommunityToolkit.Maui;
#endif
#if useblazor
Expand Down Expand Up @@ -82,6 +82,7 @@ public static MauiApp CreateMauiApp()
var builder = MauiApp
.CreateBuilder()
.UseMauiApp<App>()
.uSeShiny()
#if userdialogs
.UseUserDialogs()
#endif
Expand All @@ -96,7 +97,7 @@ public static MauiApp CreateMauiApp()
.UseUraniumUIMaterial()
.UseUraniumUIBlurs()
#endif
#if shinyframework || communitytoolkit
#if communitytoolkit
.UseMauiCommunityToolkit()
#endif
#if mediaelement
Expand Down Expand Up @@ -135,28 +136,11 @@ public static MauiApp CreateMauiApp()
#if skia || skiaextended || livecharts
.UseSkiaSharp()
#endif
#if shinyframework
.UseShinyFramework(
new DryIocContainerExtension(),
prism => prism.CreateWindow("NavigationPage/MainPage"),
new (
//-:cnd:noEmit
#if DEBUG
ErrorAlertType.FullError
#else
ErrorAlertType.NoLocalize
#endif
//+:cnd:noEmit
)
)
#elif prism
#if prism
.UsePrism(
new DryIocContainerExtension(),
prism => prism.CreateWindow("NavigationPage/MainPage")
)
.UseShiny()
#else
.UseShiny()
#endif
#if screenrecord
.UseScreenRecording()
Expand Down Expand Up @@ -421,11 +405,8 @@ public static MauiApp CreateMauiApp()
#if storereview
builder.Services.AddSingleton(Plugin.StoreReview.CrossStoreReview.Current);
#endif
#if shinyframework
builder.Services.AddDataAnnotationValidation();
#endif

#if (shinyframework || prism)
#if (prism)
builder.Services.RegisterForNavigation<MainPage, MainViewModel>();
#else
builder.Services.AddTransient<MainPage>();
Expand Down
38 changes: 18 additions & 20 deletions ProjectTemplates/ShinyApp/ShinyApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<MauiVersion>8.0.92</MauiVersion>
<MauiVersion>9.0.21</MauiVersion>
<ShinyVersion>3.3.3</ShinyVersion>
<!--#if (shinymediator)-->
<MediatorVersion>2.1.0</MediatorVersion>
<MediatorVersion>2.1.1</MediatorVersion>
<!--#endif-->
<!--slower build, faster runtime in DEBUG-->
<!-- <_MauiForceXamlCForDebug Condition="'$(Configuration)' == 'Debug'">true</_MauiForceXamlCForDebug> -->
Expand Down Expand Up @@ -62,7 +62,7 @@
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
<SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion>15.0</SupportedOSPlatformVersion>
<DefineConstants>$(DefineConstants);APPLE;PLATFORM</DefineConstants>
</PropertyGroup>

Expand Down Expand Up @@ -147,19 +147,19 @@
<!--#if (useblazor)-->
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<!--#endif-->
<PackageReference Include="Microsoft.Extensions.Telemetry" Version="8.9.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" Condition="'$(Configuration)' == 'Debug'" />
<PackageReference Include="Microsoft.Extensions.Telemetry" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" Condition="'$(Configuration)' == 'Debug'" />
<!--#if (ctmvvm)-->
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<!--#endif-->
<!--#if (shinyframework || communitytoolkit || speechrecognition)-->
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.0" />
<!--#if (communitytoolkit || speechrecognition)-->
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.1" />
<!--#endif-->
<!--#if (usecsharpmarkup)-->
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="4.2.0" />
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="5.1.0" />
<!--#endif-->
<!--#if (mediaelement)-->
<PackageReference Include="CommunityToolkit.Maui.MediaElement" Version="4.1.1" />
<PackageReference Include="CommunityToolkit.Maui.MediaElement" Version="4.1.2" />
<!--#endif-->
<!--#if (cameraview)-->
<PackageReference Include="CommunityToolkit.Maui.Camera" Version="1.0.5" />
Expand All @@ -168,33 +168,31 @@
<PackageReference Include="Camera.Maui" Version="1.5.1" />
<!--#endif-->
<!--#if (usegooglemaps)-->
<PackageReference Include="Onion.Maui.GoogleMaps" Version="6.0.0" />
<PackageReference Include="Onion.Maui.GoogleMaps" Version="6.1.0" />
<!--#endif-->
<!--#if (shinyframework || prism)-->
<!--#if (prism)-->
<PackageReference Include="Prism.DryIoc.Maui" Version="9.0.537" />
<!--#endif-->
<!--#if (reactiveui)-->
<PackageReference Include="ReactiveUI" Version="20.1.63" />
<PackageReference Include="ReactiveUI.Maui" Version="20.1.63" />
<PackageReference Include="ReactiveUI.Fody" Version="19.5.41" />
<PackageReference Include="ReactiveUI.SourceGenerators" Version="2.0.17">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<!--#if (useblazor)-->
<PackageReference Include="ReactiveUI.Blazor" Version="20.1.63" />
<!--#endif-->
<!--#endif-->
<!--#if (shinyframework)-->
<PackageReference Include="ReactiveUI.Fody" Version="19.5.41" />
<PackageReference Include="Shiny.Framework" Version="4.1.0" />
<!--#else-->
<PackageReference Include="Shiny.Core" Version="$(ShinyVersion)" />
<PackageReference Include="Shiny.Hosting.Maui" Version="$(ShinyVersion)" />
<PackageReference Include="Shiny.Support.DeviceMonitoring" Version="$(ShinyVersion)" />
<!--#endif-->
<!--#if (shinymediator)-->
<PackageReference Include="Shiny.Mediator" Version="$(MediatorVersion)" />
<PackageReference Include="Shiny.Mediator.Maui" Version="$(MediatorVersion)" />
<PackageReference Include="Shiny.Mediator.Caching" Version="$(MediatorVersion)" />
<PackageReference Include="Shiny.Mediator.Resilience" Version="$(MediatorVersion)" />
<!--#if (shinyframework || prism)-->
<!--#if (prism)-->
<PackageReference Include="Shiny.Mediator.Prism" Version="$(MediatorVersion)" />
<!--#endif-->
<!--#if (useblazor)-->
Expand All @@ -209,7 +207,7 @@
<PackageReference Include="M.BindableProperty.Generator" Version="0.11.1" />
<!--#endif-->
<!--#if (localization)-->
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.6" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="9.0.0" />
<!--#endif-->
<!--#if (usemsal)-->
<PackageReference Include="Microsoft.Identity.Client" Version="4.60.3" />
Expand All @@ -218,7 +216,7 @@
<PackageReference Include="Shiny.Extensions.Configuration" Version="$(ShinyVersion)" />
<!--#endif-->
<!--#if (sentry)-->
<PackageReference Include="Sentry.Maui" Version="4.12.0" />
<PackageReference Include="Sentry.Maui" Version="4.13.0" />
<!--#endif-->
<!--#if (sqlitelogging)-->
<PackageReference Include="Shiny.Logging.Sqlite" Version="$(ShinyVersion)" />
Expand Down
Loading

0 comments on commit a557c7c

Please sign in to comment.