This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
CSLA .NET is a business object framework for .NET. Current version is 10.1.0 (set via Nerdbank.GitVersioning in Source/version.json). The core package targets netstandard2.0, net462, net472, net48, net8.0, net9.0, and net10.0. Requires .NET SDK 10.0.100+ (see Source/global.json).
dotnet build Source\csla.test.sln
dotnet test Source\csla.test.sln --no-build --verbosity normal --filter TestCategory!=SkipOnCIServer --settings Source/test.runsettings
dotnet test Source\csla.test.sln --no-build --filter "FullyQualifiedName~Csla.Test.ClassName.MethodName"
dotnet build Source\csla.build.sln
dotnet build Source/csla.maui.build.sln
dotnet build Source\Csla.Analyzers.sln
| Solution | Purpose |
|---|---|
Source\csla.test.sln |
Primary — framework + all tests (used by CI) |
Source\csla.build.sln |
Framework libraries only (no tests) |
Source\csla.maui.test.sln |
MAUI-specific build + tests |
Source\Csla.Analyzers.sln |
Roslyn analyzers |
Source\csla.benchmarks.sln |
BenchmarkDotNet performance tests |
The main NuGet package. Key subsystems:
- Business base classes —
BusinessBase,ReadOnlyBase,CommandBase,BusinessListBase,ReadOnlyListBase,NameValueListBase,DynamicListBase(root-level .cs files) - Data Portal — Client-side in
DataPortalClient/(proxies:LocalProxy,HttpProxy,HttpCompressionProxy), server-side inServer/(SimpleDataPortal,DataPortalBroker,DataPortalSelector,ChildDataPortal).DataPortalT.csandIDataPortalT.csdefine the genericDataPortal<T>/IDataPortal<T>interfaces. - Rules engine —
Rules/contains business rules (BusinessRule,CommonRules) and authorization rules (AuthorizationRule).BrokenRulesCollectiontracks validation state. - Serialization —
Serialization/withMobileFormatterfor CSLA's custom serialization. Source generators for auto-serialization inCsla.Generators/cs/AutoSerialization/. - Configuration —
Configuration/with DI registration viaCslaBuilderandAddCsla()extension methods. - Core infrastructure —
Core/(property management, undo/n-level undo,ManagedObjectBase),Security/,State/,Reflection/
Csla.AspNetCore— ASP.NET Core integration (controllers, DI)Csla.Blazor/Csla.Blazor.WebAssembly— Blazor component supportCsla.Windows— WinForms binding supportCsla.Xaml.Wpf— WPF binding supportCsla.Xaml.Maui— .NET MAUI support
Csla.Channels.Grpc— gRPC data portal channelCsla.Channels.RabbitMq— RabbitMQ data portal channel
Source/Csla.Analyzers/— Roslyn analyzers shipped inside the Csla NuGetSource/Csla.Generators/cs/AutoSerialization/— Source generator for[AutoSerialization]Source/Csla.Generators/cs/AutoImplementProperties/— Source generator for auto-implementing CSLA propertiesSource/Csla.Generator.DataPortalInterfaces.CSharp/— Source generator for data portal interface generation
Csla.test— Main test suite (MSTest + FluentAssertions)csla.netcore.test— .NET-specific tests (MSTest + AwesomeAssertions)Csla.Blazor.Test/Csla.Blazor.WebAssembly.Tests— Blazor testsCsla.Windows.Tests— WinForms testsCsla.Analyzers.Tests— Analyzer unit testsCsla.Generator.*.Tests— Generator unit testsGraphMergerTest— Object graph merge testing
- Indent: 2 spaces (set in
.editorconfig) - Line endings: CRLF
- C# style: Allman braces,
vareverywhere, expression-bodied members preferred - Field naming:
_fieldNamefor instance fields - Nullable: Enabled in framework code (
WarningsAsErrors=nullable), disabled in test projects - Language version:
latest - Implicit usings: Enabled
- Assemblies are strong-named using
CslaKey.snk
Include the GitHub issue number: #999 Description of change
- CI runs on
windows-latestwith .NET 10 SDK - Tests use
--settings Source/test.runsettingswhich limitsMaxCpuCountto 1 (tests must not run in parallel) - Tests with
[TestCategory("SkipOnCIServer")]are excluded from CI runs - MAUI build only triggers when
Source/Csla.Xaml.Maui/,Source/Csla.Xaml.Shared/, orSource/csla.maui.test.slnare modified