CSLA .NET v5.1.0 Release Notes

Release Date: 2020-02-18 // about 4 years ago
  • ๐Ÿš€ CSLA 5 releases

    ๐Ÿš€ CSLA 5 is a big release with some breaking changes, some major enhancements, and with new support for .NET Core 3 and WebAssembly (Blazor, etc.).

    ๐Ÿš€ CSLA .NET version 5.1.0 release

    โœจ Enhancements primarily related to Blazor support, along with a few other good changes/fixes.

    ๐Ÿ”„ Change List

    ๐Ÿš€ Changes in this release.

    Highlights:

    Blazor

    • #1443 Changed Csla.Blazor.PropertyInfo to not be generic
    • #1435 Add authorization helpers for Blazor
    • #1440 Add ModelPropertyChanged event to ViewModel
    • #1410 Add ModelChanged/ModelChanging events to ViewModel
    • #1371 Ensure Csla.Blazor works on server-side code too
    • #1295 #1309 #1436 Add CslaValidator component for Blazor

    Authentication and Authorization

    • โšก๏ธ #1409 Updates to CslaClaimsPrincipal

    Razor and MVC

    • #1389 Add netcoreapp3.1 project for ASP.NET Core 3.1
    • #1368 Add netcoreapp3.0 project for ASP.NET Core 3.0
    • #1367 Add Razor tag helpers for validation (error/warn/info) text

    Data Portal

    • #1459 Fix major perf issues with CSLA 5 data portal
    • ๐Ÿ‘ #1444 DataPortalException now returns better data via ErrorInfo
    • #1424 Add ApplicationContextManagerTls type
    • #1417 Fix issue with context disappearing after async call
    • ๐Ÿ‘ป #1387 Improve exception messages from HttpProxy
    • #1386 Auto-create scoped DI service provider on data portal server
    • ๐Ÿ‘ #1332 Factory data portal needs to support DI (via constructor injection)

    Templates

    • โšก๏ธ #752 Update NuGet templates package to work in VS 2017, 2019

    Analyzers

    • #1441 Fix bug with BusinessRuleDoesNotUseAddMethods analyzer
    • #1348 Analyzer: Operation attribute usage

    Examples

    • #1358 Create XamarinExample sample app
    • #1364 Create RazorPagesExample sample app

    ๐Ÿ› Bug fixes

    • #1464 AmbiguousMatchException no longer thrown due to method overrides
    • #1400 Fix issue with ApplicationContext and LocalProxy and losing local/global context values
    • ๐Ÿ— #1402 Fix issue building CSLA in debug mode
    • #1369 Fix issues with ApplicationContext in netcore 3
    • #1360 Fix issue with DbContext in .NET Core 3

    Dependabot and NuGet dependencies

    • โฌ†๏ธ Bump Microsoft.Extensions.DependencyInjection to 3.1.1
    • โฌ†๏ธ Bump Microsoft.Extensions.DependencyInjection.Abstractions to 3.1.1
    • โฌ†๏ธ Bump Microsoft.AspNetCore.Components.Web from 3.0.0 to 3.1.1
    • โฌ†๏ธ Bump Microsoft.AspNetCore.Components from 3.0.0 to 3.1.1
    • โฌ†๏ธ Bump System.Configuration.ConfigurationManager from 4.6.0 to 4.7.0
    • โฌ†๏ธ Bump System.ComponentModel.Annotations from 4.6.0 to 4.7.0
    • ๐Ÿ”’ Bump System.Security.Permissions from 4.6.0 to 4.7.0
    • ๐Ÿ”’ Bump System.Security.AccessControl from 4.6.0 to 4.7.0
    • ๐Ÿ”’ Bump System.Security.Principal from 4.6.0 to 4.7.0
    • โฌ†๏ธ Bump System.Data.SqlClient from 4.7.0 to 4.8.0
    • โฌ†๏ธ Bump Microsoft.Data.SqlClient from 1.0.19249.1 to 1.1.1
    • โฌ†๏ธ Bump Xamarin.Forms from 4.2.0.815419 to 4.3.0.947036
    • โฌ†๏ธ Bump Google.Protobuf from 3.9.2 to 3.11.4
    • โฌ†๏ธ Bump Grpc.Net.Client from 2.24.0 to 2.27.0
    • โฌ†๏ธ Bump Microsoft.CodeAnalysis.Analyzers from 2.9.4 to 2.9.7

    Contributors


    ๐Ÿš€ CSLA .NET version 5.0.1 release

    ๐Ÿ› Bug fix release over 5.0.0.

    ๐Ÿ”„ Change List

    • #1336 Target Microsoft.Extensions.* 2.x versions, not 3.0 versions
    • #1337 Fix issue with WPF depedendencies in .NET Core 3

    ๐Ÿš€ CSLA .NET version 5.0.0 release

    ๐Ÿš€ CSLA 5 is a big release with some breaking changes, some major enhancements, and with new support for .NET Core 3 and WebAssembly (Blazor, etc.).

    ๐Ÿ”„ Change List

    ๐Ÿš€ This release contains numerous potential breaking changes so please pay attention to the โš  (possible) and ๐Ÿ›‘ (likely) breaking symbols.

    ๐Ÿฑ Some changes were made to address common issues people face using CSLA. I've tried to mark these as things to look out for because they'll likely simplify your life: ๐ŸŽ‰

    ๐Ÿ“ฆ NuGet Package Naming

    • ๐Ÿ“ฆ #1151 Rename NuGet packages to use modern conventions ๐Ÿ›‘

    ALERT: To use CSLA .NET version 5.0.0 or higher you will need to remove all older NuGet package references and reference the modern equivalents.

    Dependabot and NuGet dependencies

    • โฌ†๏ธ Bump appropriate dependencies for .NET Core 3.0
    • โฌ†๏ธ Bump Microsoft.AspNetCore from 2.0.3 to 2.2.0 in /Source
    • โฌ†๏ธ Bump Xamarin.Forms from 3.4.0.1008975 to 4.1.0.815419 in /Source
    • โž• Add Microsoft.EntityFrameworkCore from 3.0.0 in /Source
    • โฌ†๏ธ Bump Microsoft.EntityFrameworkCore from 2.2.0 to 2.2.6 in /Source
    • โฌ†๏ธ Bump Microsoft.CodeAnalysis.Analyzers from 2.6.3 to 2.9.4 in /Source
    • โฌ†๏ธ Bump Microsoft.NETCore.UniversalWindowsPlatform to 6.2.9 in /Source
    • โฌ†๏ธ Bump System.Data.SqlClient to 4.7.0 in /Source
    • โฌ†๏ธ Bump System.Principal.Windows from 4.5.1 to 4.6.0 in /Source
    • ๐Ÿ”’ Bump System.Security.AccessControl from 4.5.9 to 4.6.0 in /Source

    Data Portal

    • #1293 Fix issue where ObjectFactory wasn't working correctly with remote data portal
    • ๐Ÿฑ #1066 Implement RabbitMQ data portal (Csla.Channels.RabbitMq) ๐ŸŽ‰
    • ๐Ÿฑ #1140 Implement gRPC data portal (Csla.Channels.Grpc) ๐ŸŽ‰
    • ๐Ÿฑ #1176 Enable passing multiple parameters to root DP methods (i.e. FetchAsync) ๐ŸŽ‰
    • #787 Enable per-method dependency injection for DP_XYZ and Child_XYZ method params ๐ŸŽ‰
    • #1102 Eliminate hard-coded DP_XYZ and Child_XYZ method names ๐ŸŽ‰
    • โšก๏ธ #1167 Add UpdateAllChildren method to FieldManager to persist all child objects even if IsDirty is false
    • ๐Ÿ”’ #1164 Fix issue where LocalProxy would lock on async calls from Windows Forms
    • ๐Ÿ’… #1060 Mark Silverlight-style data portal methods (e.g. BeginFetch, BeginSave) obsolete โš 
    • ๐Ÿ”€ #1059 HttpProxy now supports both sync and async operations ๐ŸŽ‰
    • #1072 Fix issue where LocalProxy didn't flow context to async calls as expected
    • 0๏ธโƒฃ #1038 Set default transaction timeout to 600 seconds (to match Microsoft default) โš 
    • #960 Make sure only one SaveObject method is virtual โš 
    • ๐Ÿ‘ป #1103 Fix null ref exception when interacting with types that don't implement IDataPortalTarget
    • #1152 Fix server response content-length issue with Blazor serialization

    Basic Usage

    • ๐Ÿฑ #1194,#1196 Pass criteria to authorization rules via new IAuthorizationContext interface ๐Ÿ›‘
    • #1212 Fix issue with n-level undo and cloning
    • #1191 Fix edit level issue with business rules
    • ๐Ÿฑ #1101 Support nameof in RegisterProperty, replacing lambda expressions ๐ŸŽ‰
    • ๐Ÿฑ #409 Allow use of async Task ExecuteAsync business rule implementations via new BusinessRuleAsync type ๐ŸŽ‰
    • ๐Ÿฑ #1043 Default null principal to an unauthenticated principal` (no longer need to manually set principal on app startup) ๐ŸŽ‰
    • ๐Ÿ›  #1080 Fixed issues caused by using MobileFormatter for n-level undo in .NET Framework
    • ๐Ÿฑ #974 Rename DbProvider config key to CslaDbProvider ๐Ÿ›‘
    • #963 Mark RelationshipTypes.Child as Obsolete โš 
    • 0๏ธโƒฃ #1117 Fix issue where string properties would ignore explicit null default value
    • ๐Ÿฑ #1209 Add ObjectAuthorizationRules attribute so AddObjectAuthorizationRules is no longer a "magic name" method ๐ŸŽ‰

    Analyzers

    • #1100 Ensure DP methods return void or Task
    • ๐Ÿ’… #804 Update analyzers to modern project style and .NET Standard 1.3 (now requires Visual Studio 2017 or higher) โš 
    • ๐Ÿฑ #623 Fix issue where analyzer would incorrectly flag an issue with serializable attributes ๐ŸŽ‰
    • #925 Create analyzer to flag use of new keyword when creating domain objects (require use of data portal)
    • โšก๏ธ #1091 Update/cleanup analyzer code

    Blazor and WebAssembly

    • #1283 Add Blazor validation component
    • ๐Ÿฑ #1142 Add UI helper support for client-side Blazor and WebAssembly ๐ŸŽ‰
    • #1270 Add UnoExample sample

    Xamarin

    • ๐Ÿฑ #1291 Obsolete Save method in favor of SaveAsync ๐Ÿ›‘
    • #1304 Add properties to get info/warn/error text from PropertyInfo
    • #1010 Fix issue where ApplicationContext.User wasn't persisted during async operations
    • ๐Ÿ’… #1168 Mark old-style viewmodel async methods as obsolete and modernize class overall ๐Ÿ›‘

    Data Access

    • #1138 Fix NETfx-NS2 conflict with TransactionTypes enum
    • ๐Ÿ“ฆ #1150 Add support for Microsoft.Data.SqlClient via new Csla.Data.SqlClient package ๐ŸŽ‰
    • ๐Ÿ“ฆ #981 Move support for System.Data.SqlClient into new Csla.Data.SqlClient.Fx package - it is no longer in the core of CSLA ๐Ÿ›‘

    ASP.NET Core

    ๐Ÿ“ฆ ๐Ÿ›‘ ASP.NET Core 2.2 projects often rely on the Microsoft.AspNetCore.App metapackage. You can not use this metapackage with CSLA 5, because the metapackage prevents the use of .NET Core 3.0 dependencies. The easiest workaround is to switch to the Microsoft.AspNetCore.All metapackage, though other options exist. ๐Ÿ›‘

    • ๐Ÿ‘ #905 Add support for ASP.NET Core MVC validation mechanism
    • #649 Implement CSLA permission requirement handler

    WPF

    • ๐Ÿฑ #1291 Obsolete Save method in favor of SaveAsync ๐Ÿ›‘
    • #1304 Add properties to get info/warn/error text from PropertyInfo
    • #1235 Bring Csla.Xaml for WPF forward to .NET Core 3
    • ๐Ÿ’… #1168 Mark old-style viewmodel async methods as obsolete and modernize class overall ๐Ÿ›‘

    ๐Ÿ Windows Forms

    • ๐Ÿ #1234 Bring Csla.Windows forward to .NET Core 3

    Technical Debt

    • โšก๏ธ #1288 Updated /Samples for CSLA 5
    • ๐Ÿšš #1115 Remove private constructors from templates
    • ๐Ÿšš #968 Remove ApplicationContext.IsInRoleProvider property โš 
    • โšก๏ธ #1053 Update nuspec files to use license element
    • ๐Ÿšš #1070 Remove unused legacy Silverlight test code and resolve SonarQube warning
    • #1109 Add ContextManager property to CslaConfiguration fluent API
    • โšก๏ธ #1111 Update website URL to https://cslanet.com in source files
    • โšก๏ธ #1119 Update bootstrap version in ProjectTracker to resolve security warning
    • ๐Ÿ’… #750 Updated editorconfig styles
    • โšก๏ธ #1004 Update use of test database so data tests run on developer workstations

    ๐Ÿ‘€ You can see all the closed work items in GitHub.

    Contributors

    ๐Ÿš€ I want to extend special recognition to the following contributors to this release:

    • @JasonBock has put a lot of work into the analyzers - fixing long-standing issues, and creating some cool new analyzers as well - really nice!
    • ๐Ÿ @GillesBer ported the Windows Forms and WPF satellite projects for use in .NET Core 3
    • โœ… @itgoran has been helping ensure the tests all work
    • ๐Ÿ›  @oatsoda has been fixing some issues encountered in 4.9 - resulting in fixes 5.0
    • ๐Ÿ›  @Hadronicus similarly has fixed an issue in 4.9 that's in 4.10 and 5.0
    • ๐Ÿ›  @kellyethridge fixed a LocalProxy issue
    • โšก๏ธ @skalpin helped review/update some of the docs
    • @ajj7060 added features to authorization rules
    • @dazinator and @ajj7060 have been engaged in identifying issues and solutions
    • @j055 for data portal enhancements
    • ๐Ÿ— @TheCakeMonster for help building out Blazor support