Skip to content

Conversation

@danielcrenna
Copy link
Contributor

This ports the main FileHelpers library to .NET Standard 2.0 so it can be used in cross-platform .NET Core. In this stream, DataLink no longer supports Access or OleDB. T4 templates are provided by the original project, and the output is linked at build time. Otherwise all other features are intact.

This ports the main FileHelpers library to .NET Standard 2.0 so it can be used in cross-platform .NET Core. In this stream, DataLink no longer supports Access or OleDB. T4 templates are provided by the original project, and the output is linked at build time. Otherwise all other features are intact.
@jonnii
Copy link

jonnii commented Mar 14, 2018

@mcavigelli what are the odds of getting this released? We love file helpers, but lack of netcore support is forcing us to look at other options =(

@danielcrenna
Copy link
Contributor Author

danielcrenna commented Mar 14, 2018 via email

@MarcosMeli
Copy link
Owner

Hi Daniel !!

Thanks a ton for the PR, I will try to get some time to merge this PR in a new branch and publish a pre-release in the oficial NuGet package so you can consume it.

I will prefere to remove all datalink releated features of the library, because are old designed, so better with the core utilities.

What about removing the VB dependence, and allow only C# dynamic code ?

What do you think @mcavigelli to merge this version and publish it ?

Thanks to all !!

@danielcrenna
Copy link
Contributor Author

danielcrenna commented Mar 14, 2018 via email

@mcavigelli
Copy link
Collaborator

Hi Daniel and Marcos

Thanks for your pull request.

I did not know, that it is possible to use Reflection.Emit with .NET Standard as in the class Core/ReflectionHelper the case. Thanks for pointing that out.

As for the features we want to support, I would opt for just FileHelperEngine. I think that is the feature set that we want to support over time. What do you think?

I hesitate to add one or two more .sln files, referencing a new .csproj project with so many links.
I had in mind to add the csproj at the same level as the main lib and just include those files we would need to build FileHelperEngine. That would simplify the maintenance of the project.

Matthias

@danielcrenna
Copy link
Contributor Author

danielcrenna commented Mar 19, 2018 via email

- only one .NET Standard SLN for OnlyMainLib
- Multi-target support for .NET 4.0+
@danielcrenna
Copy link
Contributor Author

Latest commit reduces to a single SLN file w/ multi-targeting that will emit .net 4.0+ assemblies, so it could replace the original OnlyMainLib SLN if the build system was changed.

@iamwyza
Copy link

iamwyza commented May 3, 2018

I recently started porting an internal framework to .netstandard and was wondering what the likelihood of getting this update released. We love filehelpers and use it heavily.

@mcavigelli mcavigelli self-assigned this May 11, 2018
@mcavigelli
Copy link
Collaborator

Hello Daniel

I have looked again at the FileHelpers.Standard project with the linked files:

All the linked files are linked, with the exception of DynamicCompilationException and
ClassBuilder. These two are duplicated (except of the conditional compilation). The used
compilation symbol NETSTANDARD2_0 is used several times.
As far as I see, it is never set. Is there any reason for that?

I think the strong name key FileHelpers.snk should not be duplicated, isn't it?

The new project compiles the libraries to a different path and the .Net Framework libraries are duplicated.

I suggest that we place the FileHelpers.Standard project next to the FileHelpers project.
The new FileHelpers.Standard will use the required cs files and only compiling to .Net Standard 2.0.
Including that dll into the existing nuget packaget should possible with little work.

Does that make sense to you?

Thank for your help, Matthias

@mcavigelli
Copy link
Collaborator

mcavigelli commented May 14, 2018

Currently struggling with System.Emit.Lightweight; it is unlisted on nuget.org:
https://twitter.com/eiriktsarpalis/status/994676548132319234

It was intentionally unlisted end of April: https://github.com/dotnet/corefx/issues/29365.
I thought it was bad practice to hide previously published apis without warning or migration path:-(

Matthias

@mcavigelli
Copy link
Collaborator

It seems that this package is not returning any time soon.

I think an alternative to DynamicMethod is to read/write values through System.Linq.Expressions in ReflectionHelper.cs. Expressions are available in .Net Standard and .Net Framework. Concerning support in .Net Framework, I am not sure what is available in older versions such as 3.5.

I will look into the matter beginning of next week.

@danielcrenna
Copy link
Contributor Author

danielcrenna commented May 17, 2018 via email

nothing else needs to change, we're just no longer targetting a platform with ambiguous reflection capabilities
@danielcrenna
Copy link
Contributor Author

@mcavigelli after thinking about this more, not targetting .NET Standard 2.0 and targetting .NET Core 2.0 is just fine. In fact, it's more correct because Microsoft is explicitly stating that not all .NET Standard targets support the reflection emit namespace, but we're talking about a much smaller pool of devices than we need to worry about. I've updated the PR to work as it always did, except targeting .NET Core 2.0, where the dependencies we need exist.

@danielcrenna danielcrenna changed the title Added support for .NET Standard 2.0 / .NET Core Added support for .NET Core 2.0 May 18, 2018
@danielcrenna
Copy link
Contributor Author

All the linked files are linked, with the exception of DynamicCompilationException and
ClassBuilder. These two are duplicated (except of the conditional compilation).

Yes, for some reason I never went back to clean that up, but I have now.

The used compilation symbol NETSTANDARD2_0 is used several times.
As far as I see, it is never set. Is there any reason for that?

(It's now NETCOREAPP2_0), this is an "intrinsic" conditional compilation that VS2017 is branching off on its own for multi-targetting support (TargetFrameworks in csproj), because the csproj I prepared is outputting every target under the sun from .NET 4 to .NET Core 2.0, with the idea being that you wouldn't need the old one, though if you want to upgrade code analysis to 2.8.0 you will have to remove .NET 4.0 as a target and keep yours around anyway.

I think the strong name key FileHelpers.snk should not be duplicated, isn't it?

True, this is fixed.

The new project compiles the libraries to a different path and the .Net Framework libraries are duplicated. I suggest that we place the FileHelpers.Standard project next to the FileHelpers project.
The new FileHelpers.Standard will use the required cs files and only compiling to .Net Standard 2.0.
Including that dll into the existing nuget packaget should possible with little work.

I've done the work of "inlining" the core project with the main project, it makes sense. I'd leave the nuget packaging work up to you.

@robertcoltheart
Copy link
Contributor

Is this good to go? Can we get it merged?

@mcavigelli
Copy link
Collaborator

Yes I am merging...

@mcavigelli
Copy link
Collaborator

mcavigelli commented May 24, 2018

Here are the tasks:

  • Merge code
  • Include in build
  • Include in nuget package
    It can be downloaded from the appveyor nuget stream
    https://ci.appveyor.com/nuget/filehelpers
  • Set version and other metadata to new assembly
  • Document what is available and what not

@mcavigelli mcavigelli merged commit 2812197 into MarcosMeli:master May 25, 2018
@mcavigelli
Copy link
Collaborator

mcavigelli commented May 30, 2018

The alpha release of FileHelpers dll for .NET Core is available at https://ci.appveyor.com/nuget/filehelpers,
see https://github.com/marcosmeli/filehelpers#current-support-for-net-core for some comments on it.

Let me know, if you can use the dll on your .NET Core projects!
If it is usable, I will publish a beta version on nuget.org. But first I would
like to get some feedback, if this release works for you.

Thanks you for your testing of the alpha release, Matthias Cavigelli

@mcavigelli mcavigelli removed their assignment May 30, 2018
@mcavigelli
Copy link
Collaborator

Hi Daniel

I think I never wrote thank you! Thank you for your valuable help and for the code that made the current release possible!

Thanks a lot, Matthias

@jonnii
Copy link

jonnii commented May 30, 2018

@mcavigelli I don't think there's any harm in pushing the alpha package to nuget proper - it's much easier to consume from there for those of us using proxies etc...

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants