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

NET Core port [DNET682] #635

Closed
firebird-automations opened this issue May 24, 2016 · 8 comments
Closed

NET Core port [DNET682] #635

firebird-automations opened this issue May 24, 2016 · 8 comments

Comments

@firebird-automations
Copy link

Submitted by: Michał Ziemski (r_o_o_k)

Relate to DNET663

Votes: 1

NET Core RC2 was released recently.

I'd be great to have a build of NET Provider targeting one of the net platform standards:
https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md
that would be able to run in the new environment.

The API exposed by NET Core is somewhat different then the Framework.
Few example:
- ICloneable is no more (this could be easiliy solved by removing that from the implemented interfaces list)
- serialization was scrapped (there are some stubs available in System.Runtime.Serialization.Primitives)

There are may other issues. Sometimes easily solved by referencing a relevant CoreFX assembly (ie System.Data.Common, System.ComponentModel.Primitives, etc ):
https://github.com/dotnet/corefx
others regretfully require some more sophisticated changes.

There are also some points that are simply not availabe (AFAIK):
- distributed transactions

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue relate to DNET663 [ DNET663 ]

@firebird-automations
Copy link
Author

Commented by: Michał Ziemski (r_o_o_k)

As the NET Core 1.0 is officially out I set out to try to get FbClient to compile as netstandard1.6

I was able to compile a working client in ~1 hour by excluding some parts:
- Entity
- Schema
- Services
- Events

Possibly the last two could have been saved :)

Project.json I used:

{
"version": "1.0.0-*",

"buildOptions": \{ "allowUnsafe": true \},

"dependencies": {
"NETStandard.Library": "1.6.0",
"System.Data.Common": "4.1.0",
"System.ComponentModel.Primitives": "4.1.0",
"System.ComponentModel.TypeConverter": "4.1.0",
"System.Runtime.Serialization.Formatters": "4.0.0-rc3-24212-01",
"System.Diagnostics.Contracts": "4.0.1",
"System.Diagnostics.TraceSource": "4.0.0",
"System.Linq": "4.1.0",
"System.Linq.Parallel": "4.0.1",
"System.IO.UnmanagedMemoryStream": "4.0.1",
"System.Threading.Tasks.Parallel": "4.0.1",
"System.Net.NameResolution": "4.0.0"
},

"frameworks": {
"netstandard1.6": {
}
}
}

After the dependencies are there the rest of the process was reacting to changes in API in Core (rather straightforward
with a few more demandig cases).
Notable Examples:
- there is no Encoding.Default
- streams now Dispose rather than Close
- ToUpper/ToLower don't take a CultreInfo parameter (migh possibly be replaced by ToUpperInvariant/ToLowerInvariant)

@firebird-automations
Copy link
Author

Commented by: Michał Ziemski (r_o_o_k)

One more needed dependency (with this I was able to keep Services & Events):
System.Threading.Thread": "4.0.0"

Native client requires (at least - I wasn't able to build this part) for FbClientFactory
"System.Reflection.Emit": "4.0.1"

@firebird-automations
Copy link
Author

Commented by: Fernando Leal (fernandocode)

Are there any plans for the development of issues?

There is some preliminary version that is possible to use it for testing?

@firebird-automations
Copy link
Author

Commented by: Fernando Leal (fernandocode)

As a basis for development we could use what has already been done by [Npgsql (Postgres Provider)](npgsql/npgsql@87e8cd2), which has already moved the .NET driver and EF Core module (old EF7) (https://github.com/npgsql/npgsql).

I am using [this code version](https://sourceforge.net/projects/firebird/files/firebird-net-provider/5.0.5.0/) of source to make my tests! This is the official repository?

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Yes, the code package is correct.

I'm planning to work .NET Core once the compression support is finished.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: net-core [ 10784 ]

@firebird-automations
Copy link
Author

Commented by: Tom S (tom)

.NET Standard 2.0 is now fully RTW, including the tooling: https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-standard-2-0/ (as well as .NET Core 2.0)

Would it be possible to look into upgrading the http://ADO.NET Provider to take advantage of the new standard? Thank you!

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

No branches or pull requests

2 participants