Skip to content

Commit 9b8d206

Browse files
Release builds map the repository folder to a neutral prefix, so a package does not embed the build machine's folders (#134)
In a Release build the SDK now maps the repository root (DeterministicSourcePaths) in every path it embeds: the source files, the debug-symbol path inside each dll, and the Source Link mapping inside the symbols. A package built on a developer machine no longer carries that machine's folder names. Debug builds are unchanged, so local debugging still finds the sources. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 0bbf45d commit 9b8d206

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎Source/Directory.Build.props‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
<!-- Release candidate line: delete this element (or pass -p:VersionSuffix=) to build the stable 11.0.0 packages. -->
99
<VersionSuffix Condition="'$(Configuration)' != 'Debug'">rc.5</VersionSuffix>
1010

11+
<!-- A package built on a developer machine must not carry that machine's folder names. In a Release build the SDK maps the repository root to a neutral prefix
12+
in every path it embeds: the source files, the debug-symbol path inside each dll, and the Source Link mapping inside the symbols. -->
13+
<DeterministicSourcePaths Condition="'$(Configuration)' == 'Release'">true</DeterministicSourcePaths>
14+
1115
<!-- net11.0 is the primary/modern target: each major version of ODX targets the matching .NET.
1216
net10.0 (LTS) stays alongside it. netstandard2.0/2.1 are retained as shimmed
1317
legacy paths (via #if switching + BCL compat packages). net472 lives only on the

‎docsite/articles/whats-new-11.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Version 11 is a performance release and a tidy-up release. Result mapping is rew
77

88
## Changes since rc.4
99

10+
- A package built in a Release build no longer carries the build machine's folder names: the SDK's `DeterministicSourcePaths` maps the repository folder to a neutral prefix in the dll, the debug symbols and the Source Link mapping.
1011
- Version 11 targets .NET 11: every package adds `net11.0` next to `net10.0` (LTS), `netstandard2.0` and `netstandard2.1` (`MSSqlClient`: `net472`, `net10.0` and `net11.0`). Each major version of the library targets the matching .NET. Building the repository needs the .NET 11 SDK (`global.json`).
1112
- `.SingleResult()` can be written before `Map`, so a query reads as behavior first, then shape: `command.SingleResult().Map<Post>().ToListAsync(cancellationToken)`. It works on an expressive command (`IExecuteReader`) and on a raw `IDbCommand` or `DbCommand`, with the same `Map` overloads as before, and it is the same as `command.Map<Post>().SingleResult()`, which still works. There is none on `IDataReader` or `DataTable`: their views never read through, so there is nothing to opt out of. Nothing changes by default: without it a `Map` terminal still reads through the later result sets.
1213
- **`ExecuteScalar<T>()` and `ExecuteScalarAsync<T>()` convert the way `Map<T>()` does.** They cast the provider's value exactly, so a `bigint` read as `int`, or a `numeric` read as `long`, threw `InvalidCastException`, which a port from Dapper met only on a real database. Now a value that is already a `T` is returned as it is, an integer converts to another integer type with a range check, and any other value is converted by the same code `Map<T>()` uses. `NULL` and no row still give `default(T)`. A value that cannot be converted, or does not fit, throws `ValueMappingException` with the conversion's error inside. **Behavior change:** a call that threw `InvalidCastException` now converts, or throws that exception. `ExecuteReturn<T>()` and `ExecuteReturnAsync<T>()` convert the same way. The overloads that take a `Func<object?, T>` are unchanged.

0 commit comments

Comments
 (0)