69 Commits

Author SHA1 Message Date
Marc Gravell 8baab07773 Fully sign the StrongName assemblies on every platform (#2237)
2.1.86 shipped Dapper.StrongName and Dapper.EntityFramework.StrongName with an
all-zero strong-name signature, so they fail strong-name validation when loaded
on .NET Framework. Comparing the shipped assemblies:

  2.1.79  sig 128B, nonzero=127  real signature
  2.1.86  sig 128B, nonzero=0    public-signed only

Both projects carried

  <PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>

Public signing stamps the public key and sets the STRONGNAMESIGNED flag but
writes no actual signature: the assembly claims to be strong-named and is not.
.NET Core and later do not verify strong names, so only .NET Framework consumers
see the failure.

The condition never fired in practice because releases were packed by hand on
Windows. release.yml now builds on ubuntu-latest, so it fires on every release -
this is a regression introduced by #2230, not by anything in the signing setup.

The condition is a legacy workaround from when Roslyn could not fully sign off
Windows; it can now. Removing it rather than moving the release job to Windows
fixes the cause instead of avoiding it, and keeps a Linux developer build honest
too. Verified on Linux: a full Build.csproj pack produces real 128-byte
signatures for every TFM of both packages.

Dapper.snk is unchanged - untouched since the commit that added Dapper.StrongName
- so the public key token is identical and this is a signature fix, not an
identity change. Windows builds are unaffected: the condition was already false
there.
2026-09-22 22:46:01 +01:00
Marc Gravell 464cb337ba Update dependencies (#2202)
* first snapshot, warnings

* intermediate

* more

* more fixings

* cleanup

* nuke NETCOREAPP3_1 ref
2026-04-29 08:38:12 +01:00
Marc Gravell 288730e69b TFM packaging for .NET 10 (#2195) 2026-03-06 07:10:01 +00:00
Marc Gravell bd4f75b512 normalize async API surface over all TFMs (#2144)
* - normalize async API surface over all TFMs (fix #2143)
- target net8.0 instead of net5.0
- lib updates

* net9 SDK

* perf tests: clean up SqlClient warning

* CI fix: test concurrency

* rev snowflake
2025-02-06 12:11:30 +00:00
Marc Gravell 803e3510ea Dapper Plus (#2069)
add Dapper Plus as sponsor
2024-04-12 09:13:24 +01:00
Marc Gravell 2f56056a89 - expand auto-sproc detection to handle more scenarios and explicit exclusions (#1989)
- add net7 target
- use regex generator when available (net7+)
- fix #1984
2023-10-20 09:24:01 +01:00
Marc Gravell aecffecae1 attempt NRT makeover (#1928)
* attempt NRT makeover

- annotate NRTs on GridReader API
- add protected access to some of the GridReader internals
- switch GridReader callbacks to be more type-independent

docs

lib updates; deal with yellow warnings and test failures (SQL server certs and cancellation surfacing differently)

fix break

simplify proposed GridReader changes to protected OnBeforeGrid and OnAfterGrid[Async]

Builds: Bump library versions (#1935)

Tests: Upgrade dependencies for Dependabot (#1936)

I'll do a pass at all of these later, but getting CVE versions out of the pipe.

Resolving 4 alerts here: https://github.com/DapperLib/Dapper/security/dependabot

merge and lib updates

allow Identity to be constructed on-the-fly inside GridReader

fix build warnings

include readme

rev minor

- enable [SkipLocalsInit] everywhere
- use NET5_0_OR_GREATER
 for remoting check

# Conflicts:
#	Dapper/CommandDefinition.cs
#	Dapper/DefaultTypeMap.cs
#	Dapper/SqlMapper.Async.cs
#	Dapper/SqlMapper.IDataReader.cs
#	Dapper/SqlMapper.Link.cs
#	Dapper/SqlMapper.cs
#	Directory.Build.props

* shipped, not unshipped

* fixup SqlBuilder; use is null / is not null

* use central package management (#1949)

* Nullable test tweaks

* Nuget: let's just remove it!

* 2 test fixes from review

* fix FindExplicitConstructor

* add GetPropertySetterOrThrow

* fix NRT on FindConstructor

* DapperRow: value is object?

* use NotNullWhen

* make constructor problem more obvious

* test fixes

---------

Co-authored-by: Nick Craver <nrcraver@gmail.com>
2023-09-12 15:58:49 +01:00
Marc Gravell 6ab170c160 .Net 5 (#1572)
* initial net5.0 tweaks; also fix current IDE warnings

* lib updates and fixes

* more cleanup

* fix snafu

* skip locals init

* disable xunit shadow copy in tests

* test records

* explore scenario that currently works re #1571
2020-11-17 09:57:17 +00:00
Marc Gravell 765300a32b Enable deterministic build (#1433)
* - enable deterministic build
- lib updates for core packages

* set source root if needed

* Restore VS test runner

xUnit won't run in VS without it :)

Co-authored-by: Nick Craver <craver@stackoverflow.com>
2020-04-05 13:43:31 +01:00
mgravell 7769253d59 framework and tooling lib updates; does *NOT* include the full corpus of 3rd party ADO.NET providers 2019-09-27 10:39:40 +01:00
mgravell aefb2840bb reinstate net461 TFM; fix #1325 2019-09-12 08:30:35 +01:00
Marc Gravell 8152f2c718 WIP: Lib updates and prepare for Microsoft.Data.SqlClient (#1313)
v2 work; primarily prep for split SqlClient
2019-08-28 15:07:32 +01:00
Marc Gravell 9fbba78da0 Make Dapper happy with Microsoft.Data.SqlClient (#1262)
* prep work for adding Microsoft.Data.SqlClient support/tests; SqlClient dependency is not yet removed
2019-06-12 16:24:38 +01:00
Marc Gravell d19d6012e7 fix #1228 - rev sqlclient to 4.6.0 (#1229)
* fix #1228 - rev sqlclient to 4.6.0
* use transitive deps for SqlClient
2019-04-05 11:39:04 +01:00
Nick Craver c747c63283 Lib updates and prep for netstandard2.0 alpha 2017-09-14 10:04:29 -04:00
Nick Craver 4637c10097 Upgade libs, fix tests
This uses the new non-parallel-at-the-end I added to xUnit in https://github.com/xunit/xunit/pull/1411 This way we can run any global test that are other-test-unfriendly much more easily.
2017-08-20 14:06:27 -04:00
Sergii Volchkov a9560b3193 Enable SqlDataRecord TVPs on netstandard1.3. (#802)
* Enable SqlDataRecord TVPs on netstandard1.3.
* Update netstandard2.0 SqlClient references to Preview 2.
* Skip TransactionScope tests for netcoreapp2.0.
- According to https://github.com/dotnet/corefx/issues/12534, ambient transaction enlistment is not included with .net core 2.0.
* Update references in Dapper.StrongName.
* Disable parallel test run to stabilize flaky type handler tests.
* Disable parallel test run by assembly attribute.
* Move Issue461 tests to TypeHandlerTests.
* Group type handler tests in a collection, re-enable parallelization.
- Being part of the same collection, type handler tests will run sequentially. All other tests can run in parallel.
* Move tests relying on query cache & type maps to a separate collection.
2017-08-15 12:56:33 -04:00
Nick Craver 7e5bd308f9 netstandard2.0 functionality (w/ runtime breaks)
This adds a netstandard2.0 build to Dapper (and StrongName until v2),
adds a netstandard2.0 test lineup, restores most functionality (except
UDTs for SQL, e.g. .UdtTypeName isn't in netstandard2), and also breaks
things not actually implemented or implemented correctly in
netstandard2.0. Pushing this up so we can work through these with the
.NET teams.

Several things are still broken here (and fail tests):
- Parameter decimal values (not filed yet)
- DataTables as parameters
(https://github.com/dotnet/corefx/issues/19708)
- .GetSchemaTable() (not yet filed, implementation is completely missing
from SqlDataReader in CoreFX)

While the compile is clean, the above are runtime issues.
`SqlParameter.UdtTypeName` is a separate issue, that one just wasn't in
`netstandard2.0` at all...so we can't support UDTs there until it is.
See https://github.com/dotnet/corefx/issues/17126 for details.
2017-05-12 10:03:00 -04:00
Nick Craver d72ae17a22 Dependency: Dapper doesn't need SqlClient, only Data.Common 2017-05-11 09:36:41 -04:00
Nick Craver 75d342fa64 VS 2017 Build - Making things work (#766)
* Progress on VS 2017 build tooling
* Finally, a working VS 2017 tooling build
2017-05-06 15:42:46 -04:00
Nick Craver ae7a29a9f1 VS 2017 .csproj Migration
Due to the way VS test works (by injecting an executable entry point), the performance tests needed to be factored out. I also organized all of our existing tests better along the way.
Actual code changes to Dapper itself are very minor, only formatting and documentation fixes (which we need many more of).

The build.ps1 script is upated to work, but note that <frameworkAssemblies> is not working in .nuspec inside the packages in the new .csproj system. I consider this to be a blocker. Issue is here: https://github.com/NuGet/Home/issues/4853
2017-03-25 19:34:10 -04:00
Nick Craver f0bbbab8e5 Rename package to "Dapper"
Related: #683
2017-02-08 21:27:14 -05:00
Marc Gravell e15cb95d92 1.50.2 2016-07-22 14:53:06 +01:00
Marc Gravell 52ac8e4270 1.50.1 deploy 2016-07-08 16:19:57 +01:00
Nick Craver be5f196546 .Net Core 1.0 RTM update 2016-06-28 17:48:50 -04:00
Nick Craver 2c531d2c06 This .0 addition happens automatically...make it explicit instead. 2016-05-24 08:57:33 -04:00
Nick Craver 3d4d251a78 Switch version suffix to be a build parameter
Note: build.sh needs love from OS X/*nix later to match
2016-05-24 08:38:24 -04:00
Nick Craver 41f1fe3e3c .xproj: RC2 upgrade
This fixes null refs with the DNX MSBuild targets when building from
Visual Studio.
2016-05-24 07:29:18 -04:00
Nick Craver 9a97a0448b XMLDoc fixes for latest methods and missing DataSet in .NET Core 2016-05-24 07:19:05 -04:00
Nick Craver ad5378fcb0 RC2 Version bump, since we locked ourselves in with semver on beta9 2016-05-19 11:34:16 -04:00
Nick Craver 89908e0f02 It took several people a while to find this one. 2016-05-19 10:55:24 -04:00
Nick Craver 84a7d6464a RC2 master merge 2016-05-19 08:53:36 -04:00
Nick Craver ee615c0cc3 Upgrade project.json files to RC2 format.
Note: on a nuspec comparison, the following dependencies aren't there
anymore: Microsoft.CSharp, mscorlib, System, and System.Core aren't
explicitly specified in frameworkAssemblies anymore. The only one of
these I can imagine mattering is Microsoft.CSharp.
2016-05-17 09:48:01 -04:00
Nick Craver 10581e867e Update to RC2 final build (24027) libraries. Also bump to beta10 2016-05-16 20:54:26 -04:00
Nick Craver 7edadbd4c9 .Net Core: remove floating versions (use stable ones on Nuget.org) and get this puppy back in action.
Also: it's 2016.
2016-04-17 16:42:13 -04:00
Oren Novotny cf732e0d98 Get building 2016-04-16 21:57:07 -04:00
Oren Novotny dfff5f3724 fix outpt paths 2016-04-16 20:22:59 -04:00
Marc Gravell 2b4bb22dbd 1.50-beta9 2016-04-01 09:47:54 +01:00
Marc Gravell 4da982e2c7 Heh, AspNet and DNX (only) work in VS2015; DNX and DotNet (only) work in VS15; I guess we need to use DNX for now, then, as the only one that works in both. 2016-04-01 09:22:12 +01:00
Marc Gravell fc50aa7833 Recreate all the xproj to reflect the current tooling - old versions break VS15; enable XDocument etc in corefx (#if block was too large) 2016-04-01 09:00:33 +01:00
Marc Gravell 66a49521aa Support xml types by default (XmlDocument, XDocument, XElement) - fix #427 2016-03-02 16:27:33 +00:00
Marc Gravell 2a2c086009 1.50-beta8 deploy 2016-02-17 10:34:29 +00:00
Marc Gravell d7c92e21d9 additional tooling tweaks to make it work with current dotnet build 2016-02-10 10:35:04 +00:00
Henk Mollema db0d8daf20 Target net451 rather than dnx451
Class libraries should target net451 rather than dnx451, according to this: aspnet/Announcements#98

Also updated global.json to use DNX v1.0.0-rc1-update1
2016-02-09 21:37:21 +01:00
Marc Gravell a890c30ed0 Make use of delegate variance, so the actual delegate stored is a Func<IDataReader, YourType>; this makes it possible to efficiently expose GetRowParser<T> without any extra allocations 2016-01-14 10:23:19 +00:00
Marc Gravell 0dc392b3b2 1.50-beta6 package 2015-12-19 10:35:30 +00:00
Marc Gravell 49bc195d68 1.50-beta5 deploy 2015-12-08 13:52:01 +00:00
Marc Gravell 5708d4980c Bump to 1.50-beta4 for deploy 2015-11-26 12:06:56 +00:00
Nick Craver fd10fe7ccb A full CoreCLR/DNX friendly conversion
This eliminates the dual solutions and brings Contrib into the
project.json fold.
- Tests are ported to xUnit though SQLite is disabled on DNX due to
Issue #375 (Interop loads fail in the VS runner and  params are busted
regardless).
- Projects are consolidated down to what's currently possible with
project.json.
- Contrib moved to: Dapper.Contrib and Dapper.Tests.Contrib (so tests
appear at the end, no other reason vs. Dapper.Contrib.Tests)
- EF moved to: Dapper.EntityFramework(.StrongName)
- Rainbow moved to: Dapper.Rainbow
- SqlBuilder moved to: Dapper.SqlBuilder
- Packages are removed since it's not current-tooling friendly to keep
them (nor was it using them).
- xUnit implemented in Contrib via abstracts - this allow us to very
quickly add any database provider to the rig in a very concise way.
- Contrib unit tests fixed in various places - they were not
parallel-runner friendly
- Nuspecs removed, since they aren't used anymore (to eliminate
confusion)
- Removed speed tests for libraries that aren't on current versions of
.Net (what would we be comparing?)
- Perf tests moved to Dapper.Tests (consolidation from
Dapper.DNX.Tests), but aren't activated yet (no define)
2015-11-22 17:56:33 -05:00
Nick Craver 523f7c8df5 Cleanup, organize project.json orders 2015-11-22 17:55:00 -05:00