Skip to content

Commit cad9a44

Browse files
committed
chore(template): sync with dailydevops/dotnet-template [skip ci]
1 parent 29f5d29 commit cad9a44

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

.github/instructions/blazor.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description: 'This file contains instructions for Blazor development.
1313
* MUST write idiomatic and efficient Blazor and C# code.
1414
* MUST follow .NET and Blazor conventions and best practices.
1515
* MUST use Razor Components appropriately for component-based UI development.
16-
* MUST use the latest version C#, currently C# 13 features like record types, pattern matching, and global usings.
16+
* MUST use the latest version C#, currently C# 13 features like record types, pattern matching, and global usings (see [.NET 10 and C# 13 Adoption](../../decisions/2025-07-11-dotnet-10-csharp-13-adoption.md)).
1717
* MUST use async/await where applicable to ensure non-blocking UI operations.
1818

1919
## Code Style and Structure

.github/instructions/csharp.instructions.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,26 @@ description: 'This file contains instructions for C# development.
2121
Follow these C# coding conventions for consistency across the project.
2222

2323
* MUST use `var` when the type is obvious from the right side of the assignment.
24-
* MUST use `Argument.ThrowIfNull(x)` instead of `if (x == null) throw new ArgumentNullException(nameof(x))`, when nuget package `NetEvolve.Arguments` is referenced.
25-
* MUST use `ArgumentNullException.ThrowIfNull(x)` instead of `if (x == null) throw new ArgumentNullException(nameof(x))`, when nuget package `NetEvolve.Arguments` is not referenced.
24+
* MUST use appropriate null-checking pattern based on package availability:
25+
- When `NetEvolve.Arguments` package is referenced in project: Use `Argument.ThrowIfNull(x)`
26+
- When `NetEvolve.Arguments` package is NOT referenced: Use `ArgumentNullException.ThrowIfNull(x)`
27+
- Check `Directory.Packages.props` for `NetEvolve.Arguments` availability
28+
- Example with NetEvolve.Arguments:
29+
```csharp
30+
public void ProcessData(string data)
31+
{
32+
Argument.ThrowIfNull(data);
33+
// process data
34+
}
35+
```
36+
- Example without NetEvolve.Arguments:
37+
```csharp
38+
public void ProcessData(string data)
39+
{
40+
ArgumentNullException.ThrowIfNull(data);
41+
// process data
42+
}
43+
```
2644

2745
## Formatting
2846

.github/instructions/decisions.instructions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ If decisions appear to conflict:
132132
1. **Check states**: "accepted" decisions override "proposed" ones
133133
2. **Check dates**: More recent decisions (`lastModified`) take precedence
134134
3. **Check specificity**: More specific `applyTo` patterns override generic ones
135-
4. **Ask user**: If conflict remains unclear, request user clarification
135+
4. **Decisions vs. Instructions**: Accepted decisions from `decisions/` folder override technical instructions from `.github/instructions/` when both apply to the same situation
136+
5. **Ask user**: If conflict remains unclear, request user clarification
136137

137138
## Decision Updates
138139

AGENTS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ These files control project-wide settings and should remain unchanged unless spe
3838
* MUST NEVER change `global.json` unless explicitly asked to.
3939
* MUST NEVER change `Directory.Build.props` unless explicitly asked to.
4040
* MUST NEVER change `Directory.Build.targets` unless explicitly asked to.
41-
* MUST NEVER change `Directory.Packages.props` unless explicitly asked to.
41+
* MUST NEVER change `Directory.Packages.props` structure or properties unless explicitly asked to.
42+
- MAY add new `<PackageVersion>` entries for required NuGet packages.
43+
- MUST NOT modify existing package versions without explicit user request.
44+
- MUST NOT change MSBuild properties like `ManagePackageVersionsCentrally`.
4245

4346
## Code Reviews and Implementation
4447

0 commit comments

Comments
 (0)