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

Is it possible to retrieve AssemblyAttributes with ILRepack? #95

Closed
forki opened this issue May 20, 2015 · 5 comments
Closed

Is it possible to retrieve AssemblyAttributes with ILRepack? #95

forki opened this issue May 20, 2015 · 5 comments
Labels

Comments

@forki
Copy link

forki commented May 20, 2015

fsprojects/Paket#827

we struggle to retrieve CustomAttributes with reflection and all the assembly loading is crashing and locking files,...

I'm looking for a sane alternative.

@gluck
Copy link
Owner

gluck commented May 20, 2015

ILRepack simply uses Mono.Cecil under the hood, AFAICT you should use Cecil too instead of System.Reflection to avoid loading up the assemblies "for real".
But you probably already know that, so I may have missed the point of your question :)

@forki
Copy link
Author

forki commented May 20, 2015

ok. let's rephrase:

I assume we will take a dependency on ILRepack very soon. Since you depend
on Mono.Cecil I wonder if the API is still accessible in ILRepack.

2015-05-20 15:35 GMT+02:00 Francois Valdy [email protected]:

ILRepack simply uses Mono.Cecil under the hood, AFAICT you should use
Cecil too instead of System.Reflection to avoid loading up the assemblies
"for real".
But you probably already know that, so I may have missed the point of your
question :)


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

@gluck
Copy link
Owner

gluck commented May 20, 2015

Nope, Cecil version (custom build) is internalized in ILRepack.
You can use Cecil (any version) on your own though, it won't affect ILRepack.

You'll end up with duplicate Cecil types in your runtime, but I'm not sure you need to be concerned about that.

@forki
Copy link
Author

forki commented May 20, 2015

You'll end up with duplicate Cecil types in your runtime, but I'm not sure you need to be concerned about that.

Only concern is my dll file size.

@gluck
Copy link
Owner

gluck commented May 20, 2015

So that ~400k you could get rid of by not-internalizing-cecil in ILRepack and sharing the dependency.
Definitely doable, if you think it's worth it.

@gluck gluck added the question label May 21, 2015
@KirillOsenkov KirillOsenkov closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2024
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

3 participants