@cratis/pi 7.182.1 → 7.184.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/skills/cratis-screenplay-toolchain/references/agent-exposure.md +1 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +1 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +25 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/exp-mock-usage-analysis/LICENSE +23 -0
- package/package/corpus/skills/exp-mock-usage-analysis/NOTICE +21 -0
- package/package/corpus/skills/exp-mock-usage-analysis/SKILL.md +87 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/LICENSE +23 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/NOTICE +30 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/SKILL.md +97 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/references/aspnetcore-dotnet10to11.md +24 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/references/core-libraries-dotnet10to11.md +124 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/references/cryptography-dotnet10to11.md +38 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/references/csharp-compiler-dotnet10to11.md +165 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/references/efcore-dotnet10to11.md +94 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/references/runtime-jit-dotnet10to11.md +58 -0
- package/package/corpus/skills/migrate-dotnet10-to-dotnet11/references/sdk-msbuild-dotnet10to11.md +26 -0
- package/package/corpus/skills/pvanalyze/LICENSE +21 -0
- package/package/corpus/skills/pvanalyze/NOTICE +32 -0
- package/package/corpus/skills/pvanalyze/SKILL.md +54 -0
- package/package/corpus/skills/pvanalyze/assets/NuGet.Config +7 -0
- package/package/corpus/skills/pvanalyze/assets/dotnet-tools.json +13 -0
- package/package/corpus/skills/pvanalyze/references/commands.md +147 -0
- package/package/corpus/skills/pvanalyze/references/install.md +50 -0
- package/package/corpus/skills/pvanalyze/references/overview.md +41 -0
- package/package/profile-catalog.json +15 -2
- package/package.json +1 -1
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# C# 15 Compiler Breaking Changes (.NET 11)
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Source-Incompatible Changes
|
|
6
|
+
- New Language Features (non-breaking but relevant)
|
|
7
|
+
|
|
8
|
+
## Source-Incompatible Changes
|
|
9
|
+
|
|
10
|
+
These breaking changes are introduced by the Roslyn compiler shipping with the .NET 11 SDK. They affect all projects targeting `net11.0` (which uses C# 15 by default). These are maintained separately from the runtime breaking changes at: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/breaking-changes/compiler%20breaking%20changes%20-%20dotnet%2011
|
|
11
|
+
|
|
12
|
+
> **Note:** This checklist was captured from .NET 11 preview-era compatibility documentation and is not the exhaustive release contract. Confirm each item against the linked Microsoft compatibility page for the SDK and runtime in use before applying a fix.
|
|
13
|
+
|
|
14
|
+
### Span/ReadOnlySpan collection expression safe-context changed to `declaration-block`
|
|
15
|
+
|
|
16
|
+
**Impact: Medium.** The safe-context of a collection expression of `Span<T>` or `ReadOnlySpan<T>` type is now `declaration-block`, matching the specification. Previously the compiler incorrectly used `function-member`.
|
|
17
|
+
|
|
18
|
+
This can cause new errors when assigning a span collection expression created in an inner scope to a variable in an outer scope:
|
|
19
|
+
|
|
20
|
+
```csharp
|
|
21
|
+
// BREAKS — new error
|
|
22
|
+
scoped Span<int> items1 = default;
|
|
23
|
+
foreach (var x in new[] { 1, 2 })
|
|
24
|
+
{
|
|
25
|
+
Span<int> items = [x];
|
|
26
|
+
if (x == 1)
|
|
27
|
+
items1 = items; // error: safe-context is declaration-block
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// FIX option 1: Use an array type
|
|
31
|
+
foreach (var x in new[] { 1, 2 })
|
|
32
|
+
{
|
|
33
|
+
int[] items = [x];
|
|
34
|
+
if (x == 1)
|
|
35
|
+
items1 = items; // ok, using int[] conversion to Span<int>
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// FIX option 2: Move collection expression to outer scope
|
|
39
|
+
Span<int> items = [0];
|
|
40
|
+
foreach (var x in new[] { 1, 2 })
|
|
41
|
+
{
|
|
42
|
+
items[0] = x;
|
|
43
|
+
if (x == 1)
|
|
44
|
+
items1 = items; // ok
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### `ref readonly` synthesized delegates require `InAttribute`
|
|
49
|
+
|
|
50
|
+
**Impact: Low.** When the compiler synthesizes a delegate type for a `ref readonly`-returning method or lambda, it now properly emits metadata requiring `System.Runtime.InteropServices.InAttribute`.
|
|
51
|
+
|
|
52
|
+
```csharp
|
|
53
|
+
class RefHelper
|
|
54
|
+
{
|
|
55
|
+
private static int value = 42;
|
|
56
|
+
|
|
57
|
+
public void M()
|
|
58
|
+
{
|
|
59
|
+
// May cause CS0518 if InAttribute is not available
|
|
60
|
+
var methodDelegate = this.MethodWithRefReadonlyReturn;
|
|
61
|
+
var lambdaDelegate = ref readonly int () => ref value;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Fix:** Add a reference to an assembly defining `System.Runtime.InteropServices.InAttribute` (typically available via the default runtime references).
|
|
67
|
+
|
|
68
|
+
### `ref readonly` local functions require `InAttribute`
|
|
69
|
+
|
|
70
|
+
**Impact: Low.** Same as above but for `ref readonly`-returning local functions.
|
|
71
|
+
|
|
72
|
+
```csharp
|
|
73
|
+
void Method()
|
|
74
|
+
{
|
|
75
|
+
int x = 0;
|
|
76
|
+
ref readonly int local() => ref x; // CS0518 if InAttribute missing
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Fix:** Same as above — ensure `InAttribute` is available.
|
|
81
|
+
|
|
82
|
+
### Dynamic `&&`/`||` with interface left operand disallowed
|
|
83
|
+
|
|
84
|
+
**Impact: Low.** The compiler now reports a compile-time error when an interface type with `true`/`false` operators is used as the left operand of `&&` or `||` with a `dynamic` right operand. Previously this compiled but threw `RuntimeBinderException` at runtime.
|
|
85
|
+
|
|
86
|
+
```csharp
|
|
87
|
+
interface I1
|
|
88
|
+
{
|
|
89
|
+
static bool operator true(I1 x) => false;
|
|
90
|
+
static bool operator false(I1 x) => false;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
class C1 : I1
|
|
94
|
+
{
|
|
95
|
+
public static C1 operator &(C1 x, C1 y) => x;
|
|
96
|
+
public static bool operator true(C1 x) => false;
|
|
97
|
+
public static bool operator false(C1 x) => false;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
void M()
|
|
101
|
+
{
|
|
102
|
+
I1 x = new C1();
|
|
103
|
+
dynamic y = new C1();
|
|
104
|
+
_ = x && y; // error CS7083
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Fix:** Cast the left operand to a concrete type or to `dynamic`:
|
|
109
|
+
```csharp
|
|
110
|
+
_ = (C1)x && y; // valid
|
|
111
|
+
_ = (dynamic)x && y; // valid
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### `nameof(this.)` in attributes disallowed
|
|
115
|
+
|
|
116
|
+
**Impact: Low.** Using `this` or `base` inside `nameof` in an attribute is now properly disallowed per the language specification. This was unintentionally permitted since C# 12.
|
|
117
|
+
|
|
118
|
+
```csharp
|
|
119
|
+
// Before (.NET 10) — compiled but was unintentionally permitted
|
|
120
|
+
class C
|
|
121
|
+
{
|
|
122
|
+
string P;
|
|
123
|
+
[System.Obsolete(nameof(this.P))]
|
|
124
|
+
void M() { }
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```csharp
|
|
129
|
+
// After (.NET 11) — remove 'this.' qualifier
|
|
130
|
+
class C
|
|
131
|
+
{
|
|
132
|
+
string P;
|
|
133
|
+
[System.Obsolete(nameof(P))]
|
|
134
|
+
void M() { }
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### `with()` as collection expression element (C# 15)
|
|
139
|
+
|
|
140
|
+
**Impact: Low.** When `LangVersion` is 15 or greater, `with(...)` as an element in a collection expression is treated as constructor/factory arguments (the new "collection expression arguments" feature), not as a call to a method named `with`.
|
|
141
|
+
|
|
142
|
+
```csharp
|
|
143
|
+
object x, y, z = ...;
|
|
144
|
+
object[] items;
|
|
145
|
+
|
|
146
|
+
items = [with(x, y), z]; // C# 14: call to with() method; C# 15: error
|
|
147
|
+
items = [@with(x, y), z]; // fix: escape to call method named 'with'
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Parsing of `when` in switch-expression-arm
|
|
151
|
+
|
|
152
|
+
**Impact: Low.** In a switch expression, `(X.Y) when` is now parsed as a constant pattern `(X.Y)` followed by a `when` clause. Previously it was parsed as a cast expression casting `when` to `(X.Y)`.
|
|
153
|
+
|
|
154
|
+
## New Language Features (non-breaking but relevant)
|
|
155
|
+
|
|
156
|
+
### Collection expression arguments
|
|
157
|
+
|
|
158
|
+
C# 15 adds `with(...)` syntax as the first element of a collection expression, allowing constructor/factory arguments:
|
|
159
|
+
|
|
160
|
+
```csharp
|
|
161
|
+
List<string> names = [with(capacity: values.Count * 2), .. values];
|
|
162
|
+
HashSet<string> set = [with(StringComparer.OrdinalIgnoreCase), "Hello", "HELLO"];
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
This is the feature that causes the `with()` method call breaking change above. Whether to adopt it in Cratis code is decided by [csharp.md](../../../rules/csharp.md), not by this migration.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Entity Framework Core Breaking Changes (.NET 11)
|
|
2
|
+
|
|
3
|
+
These breaking changes affect projects using Entity Framework Core 11. Source: https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-11.0/breaking-changes
|
|
4
|
+
|
|
5
|
+
> **Note:** This checklist was captured from .NET 11 preview-era compatibility documentation and is not the exhaustive release contract. Confirm each item against the linked Microsoft compatibility page for the SDK and runtime in use before applying a fix.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
- Medium-Impact Changes
|
|
10
|
+
- Additional changes
|
|
11
|
+
|
|
12
|
+
## Medium-Impact Changes
|
|
13
|
+
|
|
14
|
+
### Sync I/O via the Azure Cosmos DB provider has been fully removed
|
|
15
|
+
|
|
16
|
+
**Impact: Medium.** Synchronous I/O via the Azure Cosmos DB provider has been completely removed. In EF Core 10, sync I/O was unsupported by default but could be re-enabled with a special opt-in. In EF Core 11, calling any synchronous I/O API always throws — there is no opt-in to restore the old behavior.
|
|
17
|
+
|
|
18
|
+
**Affected APIs:**
|
|
19
|
+
- `ToList()`, `First()`, `Single()`, `Count()`, and other synchronous LINQ operators
|
|
20
|
+
- `SaveChanges()`
|
|
21
|
+
- Any synchronous query execution against the Cosmos DB provider
|
|
22
|
+
|
|
23
|
+
```csharp
|
|
24
|
+
// BREAKS in EF Core 11 — always throws
|
|
25
|
+
var items = context.Items.ToList();
|
|
26
|
+
context.SaveChanges();
|
|
27
|
+
|
|
28
|
+
// FIX: Use async equivalents
|
|
29
|
+
var items = await context.Items.ToListAsync();
|
|
30
|
+
await context.SaveChangesAsync();
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Why:** Synchronous blocking on asynchronous methods ("sync-over-async") can lead to deadlocks and performance problems. Since the Azure Cosmos DB SDK only supports async methods, the EF Cosmos provider now requires async throughout.
|
|
34
|
+
|
|
35
|
+
**Fix:** Convert all synchronous I/O calls to their async equivalents:
|
|
36
|
+
- `ToList()` → `await ToListAsync()`
|
|
37
|
+
- `First()` → `await FirstAsync()`
|
|
38
|
+
- `Single()` → `await SingleAsync()`
|
|
39
|
+
- `Count()` → `await CountAsync()`
|
|
40
|
+
- `SaveChanges()` → `await SaveChangesAsync()`
|
|
41
|
+
- `Any()` → `await AnyAsync()`
|
|
42
|
+
|
|
43
|
+
### Cosmos: empty owned collections return empty collection instead of null
|
|
44
|
+
|
|
45
|
+
**Impact: Low.** When a Cosmos-backed entity has an owned collection with no items, the property now returns an empty collection rather than `null`.
|
|
46
|
+
|
|
47
|
+
**Fix:** Update null checks to empty-collection checks: `if (entity.Items is null)` → `if (entity.Items.Count == 0)`.
|
|
48
|
+
|
|
49
|
+
## Additional changes
|
|
50
|
+
|
|
51
|
+
### RelationalEventId.MigrationsNotFound now throws by default
|
|
52
|
+
|
|
53
|
+
**Impact: Low.** Calling `Migrate()` or `MigrateAsync()` when no migrations exist in the assembly now throws an exception rather than silently logging.
|
|
54
|
+
|
|
55
|
+
**Fix:** If intentional, suppress with: `options.ConfigureWarnings(w => w.Ignore(RelationalEventId.MigrationsNotFound))`.
|
|
56
|
+
|
|
57
|
+
### EF Core Tools and Tasks no longer transitively depend on Design
|
|
58
|
+
|
|
59
|
+
**Impact: Low.** The `Microsoft.EntityFrameworkCore.Tools` and `Microsoft.EntityFrameworkCore.Tasks` NuGet packages no longer have a transitive dependency on `Microsoft.EntityFrameworkCore.Design`.
|
|
60
|
+
|
|
61
|
+
**Fix:** If your project relied on this transitive reference, add it explicitly:
|
|
62
|
+
|
|
63
|
+
```xml
|
|
64
|
+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="11.0.0" PrivateAssets="all" />
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### EFOptimizeContext MSBuild property removed
|
|
68
|
+
|
|
69
|
+
**Impact: Low.** The `<EFOptimizeContext>true</EFOptimizeContext>` MSBuild property no longer exists. Code generation is now controlled by `<EFScaffoldModelStage>` and `<EFPrecompileQueriesStage>`.
|
|
70
|
+
|
|
71
|
+
**Fix:** Replace `<EFOptimizeContext>` with the two new properties. With `PublishAOT=true`, generation is automatic during publish.
|
|
72
|
+
|
|
73
|
+
### SqlVector<T> properties excluded from SELECT by default
|
|
74
|
+
|
|
75
|
+
**Impact: Low.** `SqlVector<T>` properties are now excluded from `SELECT` statements when materializing entities (they return `null`). They can still be used in `WHERE`/`ORDER BY` for vector search.
|
|
76
|
+
|
|
77
|
+
**Fix:** Use explicit projections to include vector values: `.Select(b => new { b.Id, b.Embedding })`.
|
|
78
|
+
|
|
79
|
+
### Microsoft.Data.SqlClient updated to 7.0
|
|
80
|
+
|
|
81
|
+
**Impact: Medium.** EF Core's SQL Server provider now depends on `Microsoft.Data.SqlClient` 7.0. In v7, Azure/Entra ID authentication dependencies (`Azure.Core`, `Azure.Identity`, `Microsoft.Identity.Client`) have been removed from the core package.
|
|
82
|
+
|
|
83
|
+
**Fix:** If using Entra ID authentication (e.g., `ActiveDirectoryDefault`, `ActiveDirectoryManagedIdentity`), add:
|
|
84
|
+
|
|
85
|
+
```xml
|
|
86
|
+
<PackageReference Include="Microsoft.Data.SqlClient.Extensions.Azure" Version="7.0.0" />
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Encryption-enabled SQLite packages removed
|
|
90
|
+
|
|
91
|
+
**Impact: Medium.** `SQLitePCLRaw 3.0` (used by `Microsoft.Data.Sqlite` 11) removed `bundle_e_sqlcipher` and several other bundle packages.
|
|
92
|
+
|
|
93
|
+
**Fix:** Switch to SQLite Encryption Extension (SEE), SQLCipher from Zetetic, or `SQLite3MultipleCiphers-NuGet`.
|
|
94
|
+
|
package/package/corpus/skills/migrate-dotnet10-to-dotnet11/references/runtime-jit-dotnet10to11.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Runtime and JIT Compiler Breaking Changes (.NET 11)
|
|
2
|
+
|
|
3
|
+
These breaking changes affect the .NET runtime and JIT compiler. Source: https://learn.microsoft.com/en-us/dotnet/core/compatibility/11
|
|
4
|
+
|
|
5
|
+
> **Note:** This checklist was captured from .NET 11 preview-era compatibility documentation and is not the exhaustive release contract. Confirm each item against the linked Microsoft compatibility page for the SDK and runtime in use before applying a fix.
|
|
6
|
+
|
|
7
|
+
## Behavioral Changes
|
|
8
|
+
|
|
9
|
+
### Minimum hardware requirements updated
|
|
10
|
+
|
|
11
|
+
**Impact: High for deployments on older hardware.** .NET 11 updates the minimum hardware requirements for both x86/x64 and Arm64 architectures.
|
|
12
|
+
|
|
13
|
+
#### x86/x64 changes
|
|
14
|
+
|
|
15
|
+
The baseline is updated from `x86-64-v1` to `x86-64-v2` on all operating systems. This means the minimum CPU must support:
|
|
16
|
+
- `CMOV`, `CX8`, `SSE`, `SSE2` (previously required)
|
|
17
|
+
- `CX16`, `POPCNT`, `SSE3`, `SSSE3`, `SSE4.1`, `SSE4.2` (newly required)
|
|
18
|
+
|
|
19
|
+
This aligns with Windows 11 requirements and covers all Intel/AMD CPUs still in official support (older chips went out of support around 2013).
|
|
20
|
+
|
|
21
|
+
The ReadyToRun (R2R) target is updated to `x86-64-v3` for Windows and Linux, adding `AVX`, `AVX2`, `BMI1`, `BMI2`, `F16C`, `FMA`, `LZCNT`, and `MOVBE`. Hardware that meets `x86-64-v2` but not `x86-64-v3` will experience additional JIT overhead at startup.
|
|
22
|
+
|
|
23
|
+
| OS | Previous JIT/AOT min | New JIT/AOT min | Previous R2R target | New R2R target |
|
|
24
|
+
|----|---------------------|-----------------|--------------------|--------------------|
|
|
25
|
+
| Apple | x86-64-v1 | x86-64-v2 | x86-64-v2 | (No change) |
|
|
26
|
+
| Linux | x86-64-v1 | x86-64-v2 | x86-64-v2 | x86-64-v3 |
|
|
27
|
+
| Windows | x86-64-v1 | x86-64-v2 | x86-64-v2 | x86-64-v3 |
|
|
28
|
+
|
|
29
|
+
#### Arm64 changes
|
|
30
|
+
|
|
31
|
+
- **Apple**: No change to minimum hardware or R2R target.
|
|
32
|
+
- **Linux**: No change to minimum hardware (still supports Raspberry Pi). R2R target updated to include `LSE`.
|
|
33
|
+
- **Windows**: Baseline updated to require `LSE` (Load-Store Exclusive), required by Windows 11 and all Arm64 CPUs officially supported by Windows 10. R2R target updated to `armv8.2-a + RCPC`.
|
|
34
|
+
|
|
35
|
+
| OS | Previous JIT/AOT min | New JIT/AOT min | Previous R2R target | New R2R target |
|
|
36
|
+
|----|---------------------|-----------------|--------------------|--------------------|
|
|
37
|
+
| Apple | Apple M1 | (No change) | Apple M1 | (No change) |
|
|
38
|
+
| Linux | armv8.0-a | (No change) | armv8.0-a | armv8.0-a + LSE |
|
|
39
|
+
| Windows | armv8.0-a | armv8.0-a + LSE | armv8.0-a | armv8.2-a + RCPC |
|
|
40
|
+
|
|
41
|
+
#### Impact
|
|
42
|
+
|
|
43
|
+
Starting with .NET 11, .NET fails to run on older hardware and prints:
|
|
44
|
+
|
|
45
|
+
> The current CPU is missing one or more of the baseline instruction sets.
|
|
46
|
+
|
|
47
|
+
For ReadyToRun-capable assemblies, there may be additional startup overhead on supported hardware that doesn't meet the R2R target.
|
|
48
|
+
|
|
49
|
+
**Fix:** Verify all deployment targets meet the new minimum requirements. For x86/x64, any CPU from ~2013 or later should be fine. For Windows Arm64, ensure `LSE` support (all Windows 11 compatible Arm64 devices).
|
|
50
|
+
|
|
51
|
+
Source: https://learn.microsoft.com/en-us/dotnet/core/compatibility/jit/11/minimum-hardware-requirements
|
|
52
|
+
|
|
53
|
+
### NativeAOT native-library outputs use `lib` prefix on Unix
|
|
54
|
+
|
|
55
|
+
**Impact: Low.** NativeAOT shared/native library outputs on Linux and macOS now follow Unix conventions and include the `lib` prefix (e.g., `libMyLib.so` instead of `MyLib.so`).
|
|
56
|
+
|
|
57
|
+
**Fix:** Update build scripts, deployment pipelines, or P/Invoke declarations that reference output filenames by the old name without the `lib` prefix.
|
|
58
|
+
|
package/package/corpus/skills/migrate-dotnet10-to-dotnet11/references/sdk-msbuild-dotnet10to11.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# SDK and MSBuild Breaking Changes (.NET 11)
|
|
2
|
+
|
|
3
|
+
These changes affect the .NET SDK, CLI tooling, NuGet, and MSBuild behavior. Source: https://learn.microsoft.com/en-us/dotnet/core/compatibility/11
|
|
4
|
+
|
|
5
|
+
> **Note:** This checklist was captured from .NET 11 preview-era compatibility documentation and is not the exhaustive release contract. Confirm each item against the linked Microsoft compatibility page for the SDK and runtime in use before applying a fix.
|
|
6
|
+
|
|
7
|
+
## Behavioral Changes
|
|
8
|
+
|
|
9
|
+
### Mono launch target not set for .NET Framework apps
|
|
10
|
+
|
|
11
|
+
**Impact: Low.** The mono launch target is no longer set automatically for .NET Framework apps. If you require Mono for execution on Linux, you need to specify it explicitly in the configuration.
|
|
12
|
+
|
|
13
|
+
Source: https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/11/mono-launch-target-removed
|
|
14
|
+
|
|
15
|
+
### NETSDK1235 warning for PackAsTool with custom .nuspec
|
|
16
|
+
|
|
17
|
+
**Impact: Low.** A new build warning `NETSDK1235` is emitted when a project has both `PackAsTool=true` and a custom `NuspecFile` property, which violates .NET Tool packaging requirements. Projects with `TreatWarningsAsErrors=true` will fail.
|
|
18
|
+
|
|
19
|
+
**Fix:** Remove the custom `NuspecFile` property when packaging as a .NET Tool, or suppress the warning if the .nuspec is compatible.
|
|
20
|
+
|
|
21
|
+
### `dotnet publish --self-contained` now parses the passed value
|
|
22
|
+
|
|
23
|
+
**Impact: Low.** `dotnet publish --self-contained` previously always interpreted the flag as `true` regardless of the passed value. It now correctly parses the value (e.g., `--self-contained false` actually produces a framework-dependent publish).
|
|
24
|
+
|
|
25
|
+
**Fix:** Review build scripts that pass `--self-contained` to ensure the intended value is correct.
|
|
26
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Managed Code
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
pvanalyze
|
|
2
|
+
Copyright (c) 2026 Managed Code
|
|
3
|
+
Licensed under the MIT License. See LICENSE.
|
|
4
|
+
|
|
5
|
+
Upstream source: https://github.com/managedcode/dotnet-skills/blob/6c69830ec1b82bc69b1b3ffe576dc9214f51aa15/catalog/Tools/pvanalyze/skills/pvanalyze/SKILL.md
|
|
6
|
+
The references/ files come from the same directory at the same revision. The command surface was checked against the pvanalyze tool repository https://github.com/adityamandaleeka/pvanalyze at commit faec9b3dbdb15e019636bcf98864b0d99a549b66 (MIT, Aditya Mandaleeka) and the published package's `--help`. No tool source is copied.
|
|
7
|
+
|
|
8
|
+
Changes made by Cratis:
|
|
9
|
+
|
|
10
|
+
LICENSE:
|
|
11
|
+
- Copy upstream MIT license and copyright verbatim.
|
|
12
|
+
|
|
13
|
+
SKILL.md:
|
|
14
|
+
- Rewrite the description and compatibility to the Cratis routing shape and the real runtime requirement (Microsoft.NETCore.App 10.x).
|
|
15
|
+
- Remove the global tool install, floating `dnx`, source-build fallback, the net8 runtime claim, the dotnet-trace install and the collection recipes; route collection to the profiling skills.
|
|
16
|
+
- Add a pinned local-tool install route with a runtime preflight, an owned task directory and stop conditions.
|
|
17
|
+
- Add inconclusive-result handling, owned-copy and cache-file guidance, and a no-code-edit boundary.
|
|
18
|
+
- Add the marked modification/source comment and Cratis precedence line.
|
|
19
|
+
|
|
20
|
+
references/commands.md:
|
|
21
|
+
- Add a Contents list and a note to run commands through `dotnet tool run`.
|
|
22
|
+
- Replace the dotnet-trace collection commands with pointers to the profiling skills.
|
|
23
|
+
- Add the empty-allocation caveat and the owned-copy limit on `clean`.
|
|
24
|
+
|
|
25
|
+
references/overview.md:
|
|
26
|
+
- Rewrite without the install model, source-build fallback, version-prefix claims and collection commands.
|
|
27
|
+
|
|
28
|
+
references/install.md, assets/dotnet-tools.json, assets/NuGet.Config:
|
|
29
|
+
- Added by Cratis. The manifest pins the published package; the NuGet configuration clears all sources except nuget.org.
|
|
30
|
+
|
|
31
|
+
Executes or downloads (instructions in the skill, not executed by this import):
|
|
32
|
+
- references/install.md: dotnet tool restore --tool-manifest .config/dotnet-tools.json --configfile .config/NuGet.Config (downloads the pinned package from nuget.org after operator approval).
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pvanalyze
|
|
3
|
+
description: Use when an existing .nettrace file needs offline GC, JIT, CPU stack, allocation, exception or call-tree analysis from the command line. Not for collecting traces, live processes or memory dumps.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires the Microsoft.NETCore.App 10.x runtime, checked with `dotnet --list-runtimes`; a .NET 11 SDK alone is not enough. Some commands need traces collected with allocation, DATAS or verbose runtime events.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Modified by Cratis from Managed Code's original (MIT): frontmatter, install, scope and the changes listed in NOTICE. Upstream: https://github.com/managedcode/dotnet-skills (catalog/Tools/pvanalyze/skills/pvanalyze/SKILL.md; see NOTICE) -->
|
|
9
|
+
|
|
10
|
+
# pvanalyze
|
|
11
|
+
|
|
12
|
+
Cratis rules in `.cratis/ai/rules/` and the `cratis-*` skills win where they differ. `pvanalyze` reads `.nettrace` files that already exist. Collecting a trace, attaching to a process, installing a profiler and capturing dumps belong to the `profiling`, `dotnet-trace-collect` and `dump-collect` skills, with explicit approval; never make them the default first step of an analysis.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
Read [references/install.md](references/install.md) before the first run. It explains the preflight (`dotnet --list-runtimes` must show Microsoft.NETCore.App 10.x), the approved nuget.org-only restore into an owned directory and the stop conditions. Copy these two assets into that directory's `.config/` as install.md describes:
|
|
17
|
+
|
|
18
|
+
- [assets/dotnet-tools.json](assets/dotnet-tools.json) holds the exact tool pin; use it as the only source of the version.
|
|
19
|
+
- [assets/NuGet.Config](assets/NuGet.Config) limits restore to nuget.org.
|
|
20
|
+
|
|
21
|
+
Run commands as `dotnet tool run pvanalyze -- <arguments>` from that directory. Do not install globally, use floating `dnx`, build from source or overwrite an existing manifest.
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
1. Confirm the trace path and whether it was collected with the events the question needs.
|
|
26
|
+
2. Copy the trace into an owned directory. Parsing writes a sibling `.pvanalyze.etlx` cache, so never analyze a trace in a directory you do not own.
|
|
27
|
+
3. Run `pvanalyze info <trace>` first to verify the file opens and contains the expected processes. Use `events --list` to see what was collected.
|
|
28
|
+
4. Pick one focused command and bound its output:
|
|
29
|
+
- `gcstats` for GC count, heap size and pause questions
|
|
30
|
+
- `alloc` for allocation by type
|
|
31
|
+
- `datas` for Dynamic Adaptation To Application Sizes heap-count tuning
|
|
32
|
+
- `jitstats` for JIT compilation cost
|
|
33
|
+
- `cpustacks` for top CPU methods, module or namespace grouping and SpeedScope export
|
|
34
|
+
- `calltree` for hot paths and caller/callee exploration
|
|
35
|
+
- `events` and `exceptions` for provider, event type, payload, PID, TID or thrown-exception filtering
|
|
36
|
+
- `timeline` and `snapshot` for time-bucketed or point-in-time context
|
|
37
|
+
5. Prefer `--format json` when another tool consumes the output, and add `--from`/`--to` only after a baseline run shows the interesting window.
|
|
38
|
+
6. Report the command, process, window and filters used, plus generated files such as a `.speedscope.json`.
|
|
39
|
+
|
|
40
|
+
Read [references/commands.md](references/commands.md) for the options of each command, and [references/overview.md](references/overview.md) for trace prerequisites and when to choose a different skill.
|
|
41
|
+
|
|
42
|
+
## Constraints
|
|
43
|
+
|
|
44
|
+
- A signal absent from the trace makes the result inconclusive. An empty `alloc`, `datas`, `exceptions` or `cpustacks` result is not evidence of zero allocations, no exceptions or no CPU time; check `events --list` and say what to recollect.
|
|
45
|
+
- Treat unexpected, empty or partially parsed output as inconclusive. The tool reading a trace does not prove it understands every runtime event.
|
|
46
|
+
- Run `clean` only on the owned copy. It removes `.pvanalyze.etlx` cache files.
|
|
47
|
+
- Analysis does not authorize editing product code; report findings and let the task decide the change.
|
|
48
|
+
- Static allocation review of source code and microbenchmarks belong to other skills.
|
|
49
|
+
|
|
50
|
+
## Validate
|
|
51
|
+
|
|
52
|
+
- `dotnet tool list --local` shows the version in the manifest, and `pvanalyze --help` and `info --help` run.
|
|
53
|
+
- `pvanalyze info <trace>` reads the trace before deeper analysis starts.
|
|
54
|
+
- JSON output parses when `--format json` is used.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# pvanalyze commands
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Baseline
|
|
6
|
+
- GC
|
|
7
|
+
- JIT
|
|
8
|
+
- CPU stacks
|
|
9
|
+
- Call tree
|
|
10
|
+
- Allocation
|
|
11
|
+
- DATAS
|
|
12
|
+
- Events
|
|
13
|
+
- Exceptions
|
|
14
|
+
- Timeline and snapshot
|
|
15
|
+
- Cache cleanup
|
|
16
|
+
|
|
17
|
+
## Baseline
|
|
18
|
+
|
|
19
|
+
Examples write `pvanalyze`; run them as `dotnet tool run pvanalyze -- <arguments>` from the directory that holds the restored tool manifest (see [install.md](install.md)). Analyze a copy of the trace in an owned directory, and bound output with `--top`, `--limit`, `--longest` or a time window.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pvanalyze --help
|
|
23
|
+
pvanalyze info ./trace.nettrace
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## GC
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pvanalyze gcstats ./trace.nettrace
|
|
30
|
+
pvanalyze gcstats ./trace.nettrace --format json
|
|
31
|
+
pvanalyze gcstats ./trace.nettrace --timeline
|
|
32
|
+
pvanalyze gcstats ./trace.nettrace --longest 5
|
|
33
|
+
pvanalyze gcstats ./trace.nettrace --from 1000 --to 2000 --timeline
|
|
34
|
+
pvanalyze gcstats ./trace.nettrace --process MyApp --format json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Use for pause time, heap size, generation distribution, and per-GC timelines.
|
|
38
|
+
|
|
39
|
+
## JIT
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pvanalyze jitstats ./trace.nettrace
|
|
43
|
+
pvanalyze jitstats ./trace.nettrace --process MyApp --format json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use for method compilation count, JIT CPU time, IL size, and native size signals.
|
|
47
|
+
|
|
48
|
+
## CPU stacks
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pvanalyze cpustacks ./trace.nettrace --top 20
|
|
52
|
+
pvanalyze cpustacks ./trace.nettrace --group-by module --top 10
|
|
53
|
+
pvanalyze cpustacks ./trace.nettrace --group-by namespace --inclusive
|
|
54
|
+
pvanalyze cpustacks ./trace.nettrace --from 1000 --to 2000 --top 10
|
|
55
|
+
pvanalyze cpustacks ./trace.nettrace --format json
|
|
56
|
+
pvanalyze cpustacks ./trace.nettrace --format speedscope --output ./trace.speedscope.json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use `--inclusive` when parent cost matters more than leaf-frame self cost.
|
|
60
|
+
|
|
61
|
+
## Call tree
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pvanalyze calltree ./trace.nettrace --depth 5
|
|
65
|
+
pvanalyze calltree ./trace.nettrace --hot-path
|
|
66
|
+
pvanalyze calltree ./trace.nettrace --caller-callee "Serialize"
|
|
67
|
+
pvanalyze calltree ./trace.nettrace --hot-path --format json
|
|
68
|
+
pvanalyze calltree ./trace.nettrace --min-percent 2 --depth 6
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Use `--hot-path` for the dominant chain and `--caller-callee` for one method substring.
|
|
72
|
+
|
|
73
|
+
## Allocation
|
|
74
|
+
|
|
75
|
+
The trace must contain allocation events. Collection uses the `profiling` or `dotnet-trace-collect` skills with approval; the runtime provider needs the GC allocation keyword at verbose level.
|
|
76
|
+
|
|
77
|
+
Analyze:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pvanalyze alloc ./trace.nettrace --top 20
|
|
81
|
+
pvanalyze alloc ./trace.nettrace --group-by namespace --format json
|
|
82
|
+
pvanalyze alloc ./trace.nettrace --group-by module --from 1000 --to 2000
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Use for top allocating types, LOH detection, and namespace or module-level allocation summaries. An empty result means the trace lacks allocation events or the window is empty; it is not evidence of zero allocations. Check `events --list` before concluding anything.
|
|
86
|
+
|
|
87
|
+
## DATAS
|
|
88
|
+
|
|
89
|
+
The trace must contain DATAS events, which need .NET 9 or later with DATAS enabled and verbose GC runtime events. Collection uses the `profiling` or `dotnet-trace-collect` skills with approval.
|
|
90
|
+
|
|
91
|
+
Analyze:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pvanalyze datas ./trace.nettrace
|
|
95
|
+
pvanalyze datas ./trace.nettrace --changes-only
|
|
96
|
+
pvanalyze datas ./trace.nettrace --samples
|
|
97
|
+
pvanalyze datas ./trace.nettrace --gen2
|
|
98
|
+
pvanalyze datas ./trace.nettrace --changes-only --format json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use for server GC heap count, gen0 budget, tuning decisions, and gen2 full-GC backstop events.
|
|
102
|
+
|
|
103
|
+
## Events
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
pvanalyze events ./trace.nettrace --list
|
|
107
|
+
pvanalyze events ./trace.nettrace --list --format json
|
|
108
|
+
pvanalyze events ./trace.nettrace --type GCStart
|
|
109
|
+
pvanalyze events ./trace.nettrace --provider DotNETRuntime --limit 50
|
|
110
|
+
pvanalyze events ./trace.nettrace --pid 1234
|
|
111
|
+
pvanalyze events ./trace.nettrace --tid 5678
|
|
112
|
+
pvanalyze events ./trace.nettrace --payload "ConnectionReset"
|
|
113
|
+
pvanalyze events ./trace.nettrace --from 500 --to 1000 --type GC
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Use event listing before guessing exact event names.
|
|
117
|
+
|
|
118
|
+
## Exceptions
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pvanalyze exceptions ./trace.nettrace
|
|
122
|
+
pvanalyze exceptions ./trace.nettrace --type NullReference
|
|
123
|
+
pvanalyze exceptions ./trace.nettrace --limit 20 --format json
|
|
124
|
+
pvanalyze exceptions ./trace.nettrace --from 1000 --to 2000
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Use for thrown exception count and detail. This does not replace crash dump analysis.
|
|
128
|
+
|
|
129
|
+
## Timeline and snapshot
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
pvanalyze timeline ./trace.nettrace
|
|
133
|
+
pvanalyze timeline ./trace.nettrace --lanes gc,cpu,exceptions,alloc,jit,events --buckets 80 --format json
|
|
134
|
+
pvanalyze snapshot ./trace.nettrace --at 1500 --window 100
|
|
135
|
+
pvanalyze snapshot ./trace.nettrace --at 1500 --window 250 --format json
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Use these commands when an agent needs a compact cross-signal view for a time range or timestamp.
|
|
139
|
+
|
|
140
|
+
## Cache cleanup
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
pvanalyze clean ./trace.nettrace
|
|
144
|
+
pvanalyze clean ./traces/
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Parsing writes `.pvanalyze.etlx` cache files beside the input. Run `clean` only on the owned copy of the trace or its directory, never on someone else's artifact directory.
|