-
Notifications
You must be signed in to change notification settings - Fork 2
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
AssemblyPlaceholder / ILDummy #1
Comments
Thanks for sharing! I'll download that copy and poke around to get familiar. I'll try to do what I can to help you improve it as you go! |
I just came across this after writing my own tool that does the same thing - although it uses the opposite approach of loading the assembly then stripping out non-public types/methods/etc. It's here if you're interested: https://github.com/djungelorm/stubber |
Cool @djungelorm. My rationale for using the additive method was that if there was a bug in the implementation at worst you get a non-functioning assembly, whereas with the subtractive method a bug in the implementation could lead to proprietary code being inadvertently distributed. For reference, there's a Microsoft tool to do just this (sort of) as part of .NET Core. In .NET parlance assemblies without implementation are "Reference Assemblies". A prerelease version of the tool is on NuGet (although it doesn't seem to have been updated in a while). The repository is here. It looks like the tool reads an assembly and then spits out a C# source file with just the public members. Presumably you can then compile the source into an actual assembly, but I haven't really tried messing around with it. My method, as janky as it is, continues to work. |
@hvacengi Hit a snag with generics working on the improved ILDummy so I just threw up the old code in AssemblyPlaceholder. It's not perfect but it gets the job done; it takes a single command line parameter which is the path to a direct containing assemblies, it then spits out dummies of them into a subdirectory
Dummies
. I'll continue to work on the improved ILDummy.The text was updated successfully, but these errors were encountered: