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
Copy file name to clipboardExpand all lines: README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,35 @@ The definition of the word exceptionless is: to be without exception. [Exception
12
12
13
13
Refer to the Exceptionless documentation here: [Exceptionless Docs](https://exceptionless.com/docs/).
14
14
15
+
### NativeAOT
16
+
17
+
The core `Exceptionless` package supports NativeAOT on `net8.0` and later. Exceptionless provides source-generated metadata for its wire models. Applications must provide a `JsonSerializerContext` for custom objects stored in event data and register the resulting serializer before creating the client:
NativeAOT applications must also register custom services and plugins explicitly. Runtime type names from configuration and unregistered concrete-type activation are intentionally unsupported because trimming cannot preserve those types reliably. Error events still contain normal runtime stack traces, but the optional IL/PDB demystification used by legacy targets is disabled.
43
+
15
44
## Getting Started (Development)
16
45
17
46
All of our [.NET clients can be installed](https://www.nuget.org/profiles/exceptionless?showAllPackages=True) via the [NuGet package manager](https://docs.nuget.org/consume/Package-Manager-Dialog).
Copy file name to clipboardExpand all lines: docs/brainstorms/2026-07-12-modern-di-stj-brainstorm.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,12 +23,12 @@ The STJ migration already exists as four focused commits on `niemyjski/drop-json
23
23
- Allow explicit `IServiceCollection` customization before the resolver is used.
24
24
- Keep Exceptionless' internally owned provider isolated from an application's root provider; hosted apps continue resolving `ExceptionlessClient` from application DI.
25
25
- Treat serialized JSON as a compatibility contract, not merely valid JSON.
26
-
- Keep STJ converters reflection-based for `netstandard2.0` and `net462` compatibility; source generation can be a later optimization.
26
+
- Keep reflection fallback for `netstandard2.0` and `net462`, but use built-in source-generated metadata for the modern `net8.0` and `net10.0` assets. NativeAOT consumers register an additional `JsonSerializerContext` for their own payload types.
27
27
28
28
## Open Questions
29
29
30
30
- Removing `IDependencyResolver` and making every internal service directly application-DI-owned is deferred to a future major version.
31
-
-A separate performance benchmark can decide whether STJ source generation is worth the additional model metadata surface.
31
+
-NativeAOT deliberately uses ordinary runtime stack traces instead of the bundled IL/PDB demystifier because the latter depends on metadata that trimming removes.
Copy file name to clipboardExpand all lines: docs/plans/2026-07-12-modern-di-stj-plan.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,14 @@
29
29
4. Inspect the final diff for accidental API breaks and remaining Newtonsoft/TinyIoC references.
30
30
5. Document Windows-only validation that still needs CI when it cannot be run on macOS.
31
31
32
+
## NativeAOT hardening
33
+
34
+
1. Multi-target the core package for `net8.0` and `net10.0` and enable the built-in AOT, trimming, and single-file analyzers.
35
+
2. Use an Exceptionless-owned `JsonSerializerContext` for the wire model and accept a consumer resolver/context for arbitrary event data.
36
+
3. Require NativeAOT consumers to register services and custom payload metadata explicitly; retain reflection and unregistered concrete activation only for dynamic-code runtimes.
37
+
4. Use regular runtime stack traces on modern targets instead of the IL/PDB demystifier, while keeping exception capture and serialization functional with reduced metadata.
38
+
5. Publish and execute a warning-as-error NativeAOT smoke application covering Microsoft DI, custom STJ metadata, storage, queues, submission, and nested exception capture in Linux CI.
39
+
32
40
## Execution results
33
41
34
42
- Baseline: 300 core tests and 10 MessagePack tests passed; 18 existing tests were skipped.
@@ -37,3 +45,4 @@
37
45
- Serializer coverage retains exact wire-format assertions and adds regressions for exclusions, depth limits, `DataDictionary` structured/raw values, settings coercion, and MessagePack marker round-trips.
38
46
-`net462` core and `net472` test assemblies build with 0 warnings and 0 errors when Windows targeting is forced on macOS. Runtime execution of the .NET Framework tests still belongs in Windows CI.
39
47
- The non-Windows solution packs successfully. A Windows-shaped core package containing both `net462` and `netstandard2.0` assets also packs successfully with explicit `SolutionDir`.
48
+
-`net8.0` and `net10.0` core builds pass with 0 AOT/trim/single-file warnings. A real NativeAOT executable now covers Microsoft DI, source-generated custom payloads, storage round-trips, queued submission, and nested exception capture; Linux CI publishes and runs that executable with linker warnings treated as errors.
0 commit comments