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

Support .NET Core, as well as .NET Framework #5

Open
tsahi opened this issue Dec 13, 2019 · 9 comments
Open

Support .NET Core, as well as .NET Framework #5

tsahi opened this issue Dec 13, 2019 · 9 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed P1 Priority 1
Milestone

Comments

@tsahi
Copy link
Owner

tsahi commented Dec 13, 2019

Is your feature request related to a problem? Please describe.
Enterprise Library as a whole, and DAAB in particular, were last released in 2013, long before .NET Core was released. As .NET Core is the future of .NET, we should support it. At the same time, .NET Framework is still widely used, and we want any new features to be available to .NET Framework as well.

Describe the solution you'd like
We should refactor the code to a Shared Project, and consume it from a .NET Core and a .NET Framework projects, with the necessary technique (e.g. DI) to accommodate for the differences.

Describe alternatives you've considered
There is a port of EntLib to .NET Core https://github.com/EnterpriseLibrary/data-access-application-block, but it didn't add any new functionality. We may work with them though.

@tsahi tsahi added enhancement New feature or request P1 Priority 1 help wanted Extra attention is needed labels Dec 13, 2019
@tsahi
Copy link
Owner Author

tsahi commented Dec 14, 2019

Or compile as .NET Standard 1.4, which is the latest that works with .NET Framework 4.6.1 with no issues. .NET 4.6.1 is still widely used, as it's the standard version coming with Windows Server 2016.

we should experiment with a demo project to see how well .NET Framework 4.6.1 and .NET Core consume .NET Standard libraries.

We should see if we are lacking API we need in .NET Standard 1.4.

@tsahi
Copy link
Owner Author

tsahi commented Dec 14, 2019

@tsahi
Copy link
Owner Author

tsahi commented Dec 14, 2019

Need to see if Microsoft.Data.SqlClient (see #7 ) works with .NET Standard 1.4.

@tsahi
Copy link
Owner Author

tsahi commented Dec 19, 2019

@tsahi tsahi pinned this issue Jan 4, 2020
@tsahi
Copy link
Owner Author

tsahi commented Jan 4, 2020

We also need to fork MicrosoftArchive/enterprise-library-common-infrastructure, and convert to .NET Standard, because this project depends on it. It can be useful if we work on other application blocks too.

@tsahi
Copy link
Owner Author

tsahi commented Jan 10, 2020

correction: we should support .NET Framework 4.6.2, and not 4.6.1. this doesn't change the .NET Standard target.
while working on this, I found out there are many APIs missing from .NET Standard 1.4. In particular, the System.Configuration namespace and TypeConverter.
System.Configuration exists as a nuget for .NET Standard 2.0, but this means only supporting .NET Framework 4.7.2+. And we should ask ourselves what does it mean when working in .NET Core environment, which has a completely new configuration model. It can work with the old app/web.config files through nuget packages, but this is, I believe, for easier conversion of .NET Framework apps to .NET Core. A new .NET Core app shouldn't use that. which means we should provide a different configuration model when running under .NET Framework and under .NET Standard.

@tsahi
Copy link
Owner Author

tsahi commented Jan 18, 2020

My current preference is to use Shared Project. But for that, first I need to fix the unit tests, because too many of them fail.

tsahi added a commit that referenced this issue Jan 20, 2020
tsahi added a commit that referenced this issue Jan 24, 2020
tsahi added a commit that referenced this issue Feb 1, 2020
@tsahi
Copy link
Owner Author

tsahi commented Feb 7, 2020

most unit tests for the Oracle support in the Data solution don't work, mostly due to referencing non-existent database objects. these will be fixed one at a time, as much as possible.
initially, tests failed because of x86-x64 incompatibility, but this was fixed by forcing tests to run in x64 at commit fc55abd

tsahi added a commit that referenced this issue Feb 15, 2020
@tsahi tsahi added this to the 6.5 milestone Jul 16, 2020
@tsahi tsahi self-assigned this Jul 16, 2020
tsahi added a commit that referenced this issue Jul 16, 2020
tsahi added a commit that referenced this issue Jul 16, 2020
tsahi added a commit that referenced this issue Jul 18, 2020
tsahi added a commit that referenced this issue Jul 18, 2020
tsahi added a commit that referenced this issue Jul 18, 2020
tsahi added a commit that referenced this issue Aug 3, 2020
tsahi added a commit that referenced this issue Aug 3, 2020
tsahi added a commit that referenced this issue Aug 3, 2020
tsahi added a commit that referenced this issue Aug 7, 2020
@tsahi
Copy link
Owner Author

tsahi commented Aug 8, 2020

At this point, the only tests that don't pass are Oracle tests. These fall into two categories:

  1. Parameter discovery failure. The OracleCommandBuilder.DeriveParameters() in System.Data.OracleClient fails to discver parameters for stored procedures, and as a result, assigning values to parameters fails, and the call to the procedure fails for number of parameters mismatch.
  2. Unicode. There are several tests which compare expected values with actual values, where the values contain diacritics in French an Spanish. These tests fail, because the data returned from the database has bad encoding. I tried to solve this several ways, with no success.

it's quite possible that replacing the System.Data.OracleClient implementation with ODP.NET, will solve these issues. This is one of the next things I will check.

tsahi added a commit that referenced this issue Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed P1 Priority 1
Projects
None yet
Development

No branches or pull requests

1 participant