Giter Site home page Giter Site logo

Support CoreCLR about delegatedecompiler HOT 20 CLOSED

hazzik avatar hazzik commented on May 19, 2024
Support CoreCLR

from delegatedecompiler.

Comments (20)

hazzik avatar hazzik commented on May 19, 2024 5

I've released DelegateDecompiler.EntityFrameworkCore.

from delegatedecompiler.

mbrookson avatar mbrookson commented on May 19, 2024 2

Is there any update or progress on .NET Core / .NET Standard 2.x support?

from delegatedecompiler.

daveaglick avatar daveaglick commented on May 19, 2024

👍 I appreciate you taking the time to figure out what it would take. I use this library like crazy and it's going to end up being a blocker for moving to .NET Core on a lot of my work-related projects (though that won't even be on the table for a long while).

from delegatedecompiler.

hazzik avatar hazzik commented on May 19, 2024

@jbogard, probably I will internalize the Mono.Reflection or switch to some other decompiler (Roslyn/Cecil/ILSpy - not sure yet).

from delegatedecompiler.

hazzik avatar hazzik commented on May 19, 2024

@jbogard @daveaglick I would happily accept a pull request

from delegatedecompiler.

rondefreitas avatar rondefreitas commented on May 19, 2024

@jbogard @hazzik looks like the assembly-saver branch of Mono.Reflection has some recent changes that address issues in vNext/Core specifically. Might be able to get @jbevain to put out a new release?

[https://github.com/jbevain/mono.reflection/tree/assembly-saver]

from delegatedecompiler.

hazzik avatar hazzik commented on May 19, 2024

@Rdefreitas I dont think that .NET Core has .GetMethodBody() method

from delegatedecompiler.

rondefreitas avatar rondefreitas commented on May 19, 2024

@hazzik if I'm not mistaken, GetMethodBody is internal but there is the MethodBody property of the MethodImplementation struct.

https://github.com/dotnet/corefx/blob/release/1.0.0-rc1/src/System.Reflection.Metadata/src/System/Reflection/Metadata/MethodImplementation.cs

from delegatedecompiler.

jbevain avatar jbevain commented on May 19, 2024

@Rdefreitas System.Reflection.Metadata is a fully managed metadata reader, it's completely separate from the traditional System.Reflection.

If .NET Core doesn't have GetMethodBody(), Mono.Reflection is going to be difficult to port.

from delegatedecompiler.

rondefreitas avatar rondefreitas commented on May 19, 2024

@jbevain, my apologies, it seems you're correct. I came across this issue in dotnet/corefx#4543, which mentions that .NET Native won't have access to retrieve MetadataTokens... I would assume this is the reason for the lack of GetMethodBody().

(@nguerrera - https://github.com/dotnet/corefx/issues/4543#issuecomment-157491151 ) You can use GetMetadataToken() from System.Reflection.TypeExtensions and then drop down to System.Reflection.Metadata to get the IL. I'll post a gist later tonight. Keep in mind that tokens will not be available on .NET Native if you're also expecting this to work there.


Having a windows-only version of Mono.Reflection would kind of defeat the purpose of even having Mono in the name. 👎 Although, maybe having a subproject that is temporarily limited wouldn't be all bad and would at least get the ball rolling (with a delay for cross-platform functionality)... perhaps Mono.Reflection.CoreFx. @hazzik, is DelegateDecompiler Mono-friendly or just using the lib?


Anyway, I was led down this road through a need to see @AutoMapper EF6 extensions ported to EF Core... I'm happy to contribute to make this happen, I just need to find the right starting point.

from delegatedecompiler.

zsvanderlaan avatar zsvanderlaan commented on May 19, 2024

I would also like to see .net core support for use with Automapper EF extensions and would be happy to help contribute if anyone can point in the right direction.

from delegatedecompiler.

jbogard avatar jbogard commented on May 19, 2024

@zsvanderlaan we're all waiting for .NET Standard 2.0/.NET Core 2.0 to drop. That's where GetMethodBody comes back. Then this will need to target netstandard20.

from delegatedecompiler.

zsvanderlaan avatar zsvanderlaan commented on May 19, 2024

In case anyone else is not familiar with this, i did some research, and from what I understand .net core 2.0 will run on top of .net standard 2.0, which is cross platform. .net standard 2.0 is the framework layer where GetMethodBody is defined, and so once .net standard 2.0 is released (suspected May 10th at Build) the Delegate Decompiler library (and its Mono.Reflection dependency) should be able to target .net standard 2.0 instead of the full .net framework currently being referenced.

from delegatedecompiler.

hazzik avatar hazzik commented on May 19, 2024

Btw, I made a PR to support .NET Standard 2.0 to Mono.Reflection: jbevain/mono.reflection#16

from delegatedecompiler.

tb-mtg avatar tb-mtg commented on May 19, 2024

Hi guys, Are there any updates now that .NET Standard/Core 2.0 specifications are complete?

from delegatedecompiler.

hazzik avatar hazzik commented on May 19, 2024

@tb-mtg I'm waiting on Mono.Reflection dependency. However you can easily reference DelegateDecompiler/Mono.Reflection from .NET Standard 2.0 assembly using compatibility mode

from delegatedecompiler.

derigel23 avatar derigel23 commented on May 19, 2024

DelegateDecompiler.EntityFramework should reference Microsoft.EntityFrameworkCore for .NET Standard/Core 2.0 or better introduce new package DelegateDecompiler.EntityFrameworkCore?

from delegatedecompiler.

jbogard avatar jbogard commented on May 19, 2024

from delegatedecompiler.

eveneveneven avatar eveneveneven commented on May 19, 2024

Are you still waiting for Mono.Reflection dependency? Will that even happen this year?
I'm eagerly awaiting support for EF Core :)

from delegatedecompiler.

hazzik avatar hazzik commented on May 19, 2024

I had to release own version of Mono.Reflection to be able to proceed.

from delegatedecompiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.