Dapper icon indicating copy to clipboard operation
Dapper copied to clipboard

Will you support CoreCLR?

Open Jetski5822 opened this issue 11 years ago • 50 comments

Hey - Are there any plans to port Dapper over the the CoreCLR?

Jetski5822 avatar Feb 07 '15 15:02 Jetski5822

Only in the "yeah, that'd be good" sense of "plans". I haven't had opportunity to investigate, although from what I gather the restricted metaprogramming means it won't be trivial, and the underlying data API is significantly different. So: it isn't trivial.

I need to set some time aside to investigate. On 7 Feb 2015 15:19, "Nicholas Mayne" [email protected] wrote:

Hey - Are there any plans to port Dapper over the the CoreCLR?

— Reply to this email directly or view it on GitHub https://github.com/StackExchange/dapper-dot-net/issues/241.

mgravell avatar Feb 07 '15 22:02 mgravell

Have you had some time to investigate this?

Rinsen avatar May 13 '15 12:05 Rinsen

Seems as though there is a branch! https://github.com/StackExchange/dapper-dot-net/tree/CoreCLR

Jetski5822 avatar May 13 '15 12:05 Jetski5822

Oh, there's more than a branch - the branch has merged, and I dropped some beta packages to NuGet. This was only in the last week or so - I just forgot to update here. Let me know if you get any problems in beta* - but more that the latest does not include the CorwCLR bits On 13 May 2015 1:48 pm, "Nicholas Mayne" [email protected] wrote:

Seems as though there is a branch! https://github.com/StackExchange/dapper-dot-net/tree/CoreCLR

— Reply to this email directly or view it on GitHub https://github.com/StackExchange/dapper-dot-net/issues/241#issuecomment-101652850 .

mgravell avatar May 13 '15 14:05 mgravell

There have for sure been some time invested, interesting :)

I will check it out!

Rinsen avatar May 13 '15 15:05 Rinsen

This is the one you want for now:

https://www.nuget.org/packages/Dapper/1.41.0-beta5 On 13 May 2015 4:32 pm, "Fredrik Rinsén" [email protected] wrote:

There have for sure been some time invested, interesting :)

— Reply to this email directly or view it on GitHub https://github.com/StackExchange/dapper-dot-net/issues/241#issuecomment-101716260 .

mgravell avatar May 13 '15 18:05 mgravell

The parts of dapper that i use seems to work as they should :)

Thanks!

Rinsen avatar May 14 '15 20:05 Rinsen

Just watch out for anything involving precision/scale: the current sql-server provider (nothing to do with me) is broken here. I have loggd bugs. On 14 May 2015 9:36 pm, "Fredrik Rinsén" [email protected] wrote:

The parts of dapper that i use seems to work as they should :)

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/StackExchange/dapper-dot-net/issues/241#issuecomment-102161770 .

mgravell avatar May 14 '15 20:05 mgravell

The 1.41.0-beta5 build already appears to be stale with the latest dnx release. I had to make a few changes (discussed here: https://github.com/StackExchange/dapper-dot-net/pull/310), rebuild and locally deploy the package to get it working. An updated prerelease package on Nuget would help, but ultimately there seems to be a challenge with naming and versioning to support the various frameworks.

As it stands now, there doesn't appear to be a way to have net35 alongside dnx451 and dnxcore50 in a single package. There is an question posed about it here: https://github.com/aspnet/dnx/issues/1894. The solution taken in the above package 1.41.0-beta5 was to remove net35, but that approach would be a breaking change. Presumably this limits the ability to have CoreClr support in a package not marked as prerelease.

I realize that CoreCLR is still in Beta, but are there any thoughts on how Dapper CoreClr support will work going forward?

cbeall avatar Jul 11 '15 16:07 cbeall

Do you have any plans to create a build targeting asp.net beta6 @mgravell ?

The beta5 package gave me some real headache yesterday and today when i tried to do some updates to beta6, but I don´t really understand why dnx/asp.net did not give me a better clue of what was wrong...

https://github.com/aspnet/Mvc/issues/2959

Ignore this, it is only in one of my environments....

Rinsen avatar Aug 12 '15 23:08 Rinsen

@mgravell seems like the System.Runtime reference (https://github.com/StackExchange/dapper-dot-net/blob/master/Dapper/project.json#L16) under net45 is the cause of the issue @Rinsen is running into. Could you move the reference to the frameworkAssemblies node?

"net45": {
    "compilationOptions": { "define": [ "ASYNC" ], "warningsAsErrors": true },
    "frameworkAssemblies": {
        "System.Data": "4.0.0.0",
        "System.Runtime": "4.0.0.0"
    }
}

pranavkm avatar Aug 24 '15 19:08 pranavkm

I haven't had time to update with the latest betas etc; I will blow the dust off and investigate. Thanks for the suggestion re the main change - it helps!

On 24 Aug 2015 8:45 pm, "Pranav K" [email protected] wrote:

@mgravell seems like the System.Runtime reference ( https://github.com/StackExchange/dapper-dot-net/blob/master/Dapper/project.json#L16) under net45 is the cause of the issue @Rinsen is running into. Could you move the reference to the frameworkAssemblies node?

"net45": { "compilationOptions": { "define": [ "ASYNC" ], "warningsAsErrors": true }, "frameworkAssemblies": { "System.Data": "4.0.0.0", "System.Runtime": "4.0.0.0" } }

— Reply to this email directly or view it on GitHub.

mgravell avatar Aug 24 '15 20:08 mgravell

Update on this: I've updated the CoreCLR packages, but we're looking through other open issues and PRs before doing another NuGet push on a 1.43 beta. We're tight on time over here, so thanks for the patience!

NickCraver avatar Sep 02 '15 23:09 NickCraver

Any update on this? I'd love to be able to use Dapper for my dnxcore project.

ShaneCourtrille avatar Oct 07 '15 23:10 ShaneCourtrille

@ShaneCourtrille Sorry, we've been a bit busy and haven't gotten to pull requests - there is .Net core support on NuGet that will use the latest packages on most restores anyway (due to newest-wins resolution) - check out 1.41-beta5 here: https://www.nuget.org/packages/Dapper/1.41.0-beta5 (I'm using it without problems in a DNX solution now).

NickCraver avatar Oct 08 '15 01:10 NickCraver

Just tried using the 1.41.0-beta5 on an ASPNET5 1.0.0-beta8 site, and I'm seeing the following error in the build output:

MSBUILD : DNX 4.5.1 error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Users\KeithWilliams\.dnx\packages\System.Runtime\4.0.20-beta-22816\lib\net45\System.Runtime.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.Runtime.dll'. Remove one of the duplicate references.

Quick Google suggests: https://github.com/aspnet/dnx/issues/2031

Keep up the good work, looking forward to running my project CoreCLR only!

keith-vikode avatar Oct 20 '15 16:10 keith-vikode

That is related to the issue I had earlier and that @pranavkm suggest a solution on.

Rinsen avatar Oct 20 '15 17:10 Rinsen

Oops, you're right, should've read the thread more closely!

keith-vikode avatar Oct 20 '15 21:10 keith-vikode

CoreCLR support is in beta by the way - 1.50-beta* should be very CoreCLR friendly. I'll leave this open a while longer for feedback...but we should be good to go here.

Outside Dapper, CoreCLR work is not done. The discussion about what the differences between CLR and CoreCLR should be regarding the bits very important to Dapper and other ORMs is far from resolved.

NickCraver avatar Nov 27 '15 13:11 NickCraver

Just FYI, 1.50-beta is working like a dream for me when combined with the beta System.Data.SqlClient package!

On 27 Nov 2015, at 13:03, Nick Craver [email protected] wrote:

CoreCLR support is in beta by the way - 1.50-beta* should be very CoreCLR friendly. I'll leave this open a while longer for feedback...but we should be good to go here.

Outside Dapper, CoreCLR work is not done. The discussion about what the differences between CLR and CoreCLR should be regarding the bits very important to Dapper and other ORMs is far from resolved https://github.com/dotnet/corefx/issues/3480.

— Reply to this email directly or view it on GitHub https://github.com/StackExchange/dapper-dot-net/issues/241#issuecomment-160135341.

keith-vikode avatar Nov 27 '15 13:11 keith-vikode