You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Run all tests across all target frameworks (net8.0, net9.0, net10.0)
dotnet test# Run tests for a specific framework# (recommended when working on a single test failure)
dotnet test --framework net8.0
# Run tests with verbose output
dotnet test --logger "console;verbosity=detailed"# Run tests in a specific project (avoid running other test projects)
dotnet test --project test/LayeredCraft.DynamoMapper.Generators.Tests/LayeredCraft.DynamoMapper.Generators.Tests.csproj
# Discover available tests (xUnit v3 + Microsoft.Testing.Platform)# Copy the fully-qualified test name from this output.
DOTNET_NOLOGO=1 dotnet test \
--project test/LayeredCraft.DynamoMapper.Generators.Tests/LayeredCraft.DynamoMapper.Generators.Tests.csproj \
-f net10.0 \
-v q \
--list-tests \
--no-progress \
--no-ansi
# Run a single test method (exact fully-qualified name)
DOTNET_NOLOGO=1 dotnet test \
--project test/LayeredCraft.DynamoMapper.Generators.Tests/LayeredCraft.DynamoMapper.Generators.Tests.csproj \
-f net10.0 \
-v q \
--filter-method "MyNamespace.MyTestClass.MyTestMethod" \
--minimum-expected-tests 1 \
--no-progress \
--no-ansi
# Common filter variants
DOTNET_NOLOGO=1 dotnet test \
--project test/LayeredCraft.DynamoMapper.Generators.Tests/LayeredCraft.DynamoMapper.Generators.Tests.csproj \
-f net10.0 \
-v q \
--filter-class "MyNamespace.MyTestClass" \
--minimum-expected-tests 1 \
--no-progress \
--no-ansi
DOTNET_NOLOGO=1 dotnet test \
--project test/LayeredCraft.DynamoMapper.Generators.Tests/LayeredCraft.DynamoMapper.Generators.Tests.csproj \
-f net10.0 \
-v q \
--filter-namespace "MyNamespace.Tests" \
--minimum-expected-tests 1 \
--no-progress \
--no-ansi
Taskfile Commands (if task is installed)
task format # Code formatting with CSharpier
task clean # Clean build artifacts
task restore # Restore NuGet dependencies
task build # Build Release configuration
task pack # Create NuGet packages
task pack-local # Publish to local NuGet source
Code Style Guidelines
C# Code Style
Indentation: 4 spaces (enforced by .editorconfig)
Line Length: 100 characters maximum
File-scoped namespaces: Preferred over block-scoped
Nullable Reference Types: Always enabled
Target-typed new: Use new() when type is obvious
Line endings: LF for C# files
Trailing whitespace: Always trimmed
Naming Conventions/
Classes/Records: PascalCase with descriptive suffixes (MapperClassInfo, PropertyAnalysis)
Methods: PascalCase for public, camelCase for private
Constants: PascalCase with underscores (MapperSyntaxProvider_Extract)
Private Fields: camelCase with underscore prefix when needed (_lazyWellKnownTypes)
Test Methods: Descriptive names with underscores for readability (Simple_HelloWorld)
// Use DiagnosticResult<T> for functional error handlingreturnDiagnosticResult<PropertyAnalysis>.Success(analysis);// Or failure with diagnosticsreturnDiagnosticResult<PropertyAnalysis>.Failure(DiagnosticDescriptors.CannotConvertFromAttributeValue,locationInfo,propertyName,typeName);// Use Map/Bind for chaining operationsreturnresult.Map(value =>Transform(value)).Bind(transformed =>Validate(transformed));
Culture and Localization
Always use InvariantCulture for numeric conversions: