Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will you support CoreCLR? #241

Closed
Jetski5822 opened this issue Feb 7, 2015 · 50 comments
Closed

Will you support CoreCLR? #241

Jetski5822 opened this issue Feb 7, 2015 · 50 comments
Labels

Comments

@Jetski5822
Copy link

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

@mgravell
Copy link
Member

mgravell commented Feb 7, 2015

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
#241.

@Rinsen
Copy link

Rinsen commented May 13, 2015

Have you had some time to investigate this?

@Jetski5822
Copy link
Author

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

@mgravell
Copy link
Member

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
#241 (comment)
.

@Rinsen
Copy link

Rinsen commented May 13, 2015

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

I will check it out!

@mgravell
Copy link
Member

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
#241 (comment)
.

@Rinsen
Copy link

Rinsen commented May 14, 2015

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

Thanks!

@mgravell
Copy link
Member

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
#241 (comment)
.

@cbeall
Copy link

cbeall commented Jul 11, 2015

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: #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: aspnet/dnx#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?

@Rinsen
Copy link

Rinsen commented Aug 12, 2015

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...

aspnet/Mvc#2959

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

@pranavkm
Copy link

@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"
    }
}

@mgravell
Copy link
Member

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.

@NickCraver
Copy link
Member

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!

@ShaneCourtrille
Copy link

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

@NickCraver
Copy link
Member

@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).

@keith-vikode
Copy link

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: aspnet/dnx#2031

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

@Rinsen
Copy link

Rinsen commented Oct 20, 2015

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

@keith-vikode
Copy link

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

@NickCraver
Copy link
Member

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.

@keith-vikode
Copy link

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 #241 (comment).

@mihevc
Copy link

mihevc commented Jan 18, 2016

I have a rough version of the net connector mysql driver converted for corefx. I haven't been able to figure out a way to reach the net connect team to offer them the code. You can ping me if you are interested. It runs with 1.50 dapper beta. All the mysql tests are passing in dapper and contrib. There might be some features disabled in the mysql driver but all the code is there.

@mgravell
Copy link
Member

That's awesome news. By the "net connect" team, do you mean at mysql? I
actually looked at trying to do this myself, but after several hours of
searching I couldn't even find the code, let alone find a well-managed
contribution process. I do remember the process looking more bureaucratic
and complex than github! If you don't mind, I'll try to use my reach to
help track down some contacts. Let's do this!

;p

On 18 January 2016 at 21:50, mihevc [email protected] wrote:

I have a rough version of the net connector mysql driver converted for
corefx. I haven't been able to figure out a way to reach the net connect
team to offer them the code. You can ping me if you are interested. It runs
with 1.50 dapper beta. All the mysql tests are passing in dapper and
contrib. There might be some features disabled in the mysql driver but all
the code is there.


Reply to this email directly or view it on GitHub
#241 (comment)
.

Regards,

Marc

@mihevc
Copy link

mihevc commented Jan 18, 2016

Yes, MySql. It's the code from this site. https://dev.mysql.com/downloads/connector/net/6.9.html. It took me a good week to convert and get the unit tests passing. There is a lot of security and streaming that is different between corefx and dot net.

@mgravell
Copy link
Member

As far as I can tell, the "process" (quotes quite intentional... I'm not
sure it qualifies) would be to file a bug on http://bugs.mysql.com/ under
the category Connector / NET; I suspect your changes are too large to
conveniently attach, so probably best to just indicate that you have a
working implementation. I suspect Chiranjeevi Battula is the person who
needs to see it.

On 18 January 2016 at 22:11, mihevc [email protected] wrote:

Yes, MySql. It's the code from this site.
https://dev.mysql.com/downloads/connector/net/6.9.html. It took me a good
week to convert and get the unit tests passing. There is a lot of security
and streaming that is different between corefx and dot net.


Reply to this email directly or view it on GitHub
#241 (comment)
.

Regards,

Marc

@vdaron
Copy link

vdaron commented Jan 19, 2016

A litlle off topic here,

@mihevc @mgravell beware of License issue with Mysql official connector (GPL) all code using it must be GPL as well. (I still have to manage this issue in SimpleStack as well)

My two cents

@mgravell
Copy link
Member

That's very relevant; interesting. Options, then, as I see it:

  • license the test project as GPL
  • remove the mysql tests
  • create a demonstrably separate project (different repo) for the mysql tests with a GPL license
  • see if we qualify for the FOSS exemption somehow
  • (other options)

Since nobody will be consuming the test project, I don't see the first one as problematic, but IANAL as to whether that is sufficient. I will ponder.

@mgravell
Copy link
Member

I think we're ok here;

  1. we're not distributing their libraries
  2. apache 2.0 is listed in http://www.mysql.com/about/legal/licensing/foss-exception/

@NickCraver
Copy link
Member

Yep, agree with @mgravell's interpretation above after independently researching here. Are you aware of the FOSS exceptions @vdaron? They do list MIT (for SimpleStack) but no version.

@vdaron
Copy link

vdaron commented Jan 19, 2016

I was not aware of these foss exceptions.

If it is not a problem for Dapper/SimpleStack, it remain important for people using Dapper/SimpleStack for non free software.

@mgravell
Copy link
Member

As I interpret it, though, that is more a case of people knowing what their
dependency chain is. Since you have specific sub-packages that explicitly
target MySql, I can totally see that you'd want to make it clear to people
"hey, if you do this, you're taking a dependency on something that has
licensing you really need to know about". It doesn't really apply so much
to dapper at the moment, as we don't have any package code that would take
that dependency; instead, the situation is reversed: the user takes a
dependency on dapper and whatever ADO.NET provider they choose (nothing to
do with us). And obviously, they are responsible for their choice of
dependencies.

Very much worth taking a few minutes for us to look into, but I just don't
think it impacts dapper. If you disagree, can you be more specific as to:
how?

On 19 January 2016 at 11:20, Vincent DARON [email protected] wrote:

It is especially important for people using Dapper/SimpleStack for non
free software


Reply to this email directly or view it on GitHub
#241 (comment)
.

Regards,

Marc

@RichiCoder1
Copy link

bump now that Core and company are RC2

@NickCraver
Copy link
Member

@RichiCoder1 I have updated for RC2 here: https://github.com/StackExchange/dapper-dot-net/tree/netstandard We'll give it a sanity check before merging in and get an RC2 package up as soon as Marc and I can find some time to review.

@RichiCoder1
Copy link

@NickCraver awesome! Thanks and great job :)

@jpsingleton
Copy link

Just to add that I had beta 8 working well on RC1 but can't get beta 8 or 9 working on RC2. I get the following error after porting and running a web app that builds fine.

FileNotFoundException: Could not load file or assembly 'System.Data.SqlClient ...

So looking forward to beta 10. Interesting comment in #504 BTW.

I've had to mark Dapper as not supported now on https://anclafs.com but I'll change this when the fixed package is out. Or feel free to send a PR to https://github.com/jpsingleton/ANCLAFS.

Keep up the good work @NickCraver @mgravell!

@NickCraver
Copy link
Member

1.50-beta10 (supporting RC2) has been pushed to NuGet. Let us know if you have any issues!
https://www.nuget.org/packages/Dapper/1.50.0-beta10

@NickCraver
Copy link
Member

Oh and StrongName is available too, if you're sick and twisted like that:
https://www.nuget.org/packages/Dapper.StrongName/1.50.0-beta10

@NickCraver
Copy link
Member

Scratch that. beta10 is lower than beta9 in semantic versioning. Luckily, rc2 isn't so I figure that was much clearer.
New link: https://www.nuget.org/packages/Dapper/1.50.0-rc2

@jpsingleton
Copy link

Awesome, works a treat. Thanks guys. I've reverted my previous update.

@agoretsky
Copy link

what about Jil rc2 support?

@NickCraver
Copy link
Member

Oh right, I'll get to it soon. I have a backlog of stuff here - will get a
PR to Kevin soon as I can get eyes on it.
On Fri, May 20, 2016 at 1:24 PM Anton Goretsky [email protected]
wrote:

what about Jil rc2 support?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#241 (comment)

@agoretsky
Copy link

@NickCraver, thanks!)

@KroanNL
Copy link

KroanNL commented Jun 4, 2016

@NickCraver Hey. Thanks for al your work. If I use the dapper rc2 package, I get an error when compiling saying that my SqlConnection does not support "Execute". I have the appropiate using Dapper statement. Anything I'm missing?

using (IDbConnection db = new SqlConnection(connectionString)) { var sql = "random sql statement" db.Execute(query, product);}

Edit: Nevermind. Updating to the rc2a version of dapper worked

@JMan77
Copy link

JMan77 commented Nov 29, 2016

Thanks for the great work around Dapper. I have it running well in a .net 4.5 environment, but am getting some issues when porting to .net Core with Sql Server. Is there a known issue around the exception below? I can see my sql executing on sql profiler, but then receive this error. Does anyone have a solution for this?

                using (SqlConnection cn = DbConnection)
                {
                    cn.Open();
                    var result = cn.Query<T>("SELECT * FROM Users");
                    cn.Close();
                    return result.ToList();
                }

The server is attempting to use a feature that is not supported on this platform. Received an unsupported token 'Udt' while reading data from the server. at System.Data.SqlClient.TdsParser.TryCommonProcessMetaData(TdsParserStateObject stateObj, _SqlMetaData col) at System.Data.SqlClient.TdsParser.TryProcessMetaData(Int32 cColumns, TdsParserStateObject stateObj, _SqlMetaDataSet& metaData) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader() at SqlServerTests.Program.Main(String[] args) in...

@mgravell
Copy link
Member

That's very odd; what is T in that?

@mgravell
Copy link
Member

Note: that error is happening inside the SqlClient ADO.NET library - not in dapper. My first guess would be that one of the columns is ... "unusual" in some way? What are the columns here? Also: is this SQL Azure? We've seen cases in the past where SQL Azure works differently, so it would be good to rule that out.

@JMan77
Copy link

JMan77 commented Nov 30, 2016

Thanks for the feedback. The issue seems to be the sql geography type. When using Dapper 1.4.2 and querying the same table, I get results, but using Dapper 1.50.3-beta1 or 1.50.2 with .net Core, I get the issue above. I took the geography column out and it worked fine. I've tried both Sql 2012 and Sql 2014.

@mgravell
Copy link
Member

mgravell commented Nov 30, 2016 via email

@JMan77
Copy link

JMan77 commented Dec 1, 2016

You're right - using ADO.net results in the same error and it's specifically around the geography type.

@mgravell
Copy link
Member

mgravell commented Dec 1, 2016 via email

@NickCraver
Copy link
Member

Closing this issue out, .NET Core is rocking on and comments above aren't related to Dapper overall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests