Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7779325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:37:16+00:00 2026-06-01T18:37:16+00:00

I have a dll named ExpensiveAndLargeObfuscatedFoo.dll. Lets says it defines a type named ExpensiveAndLargeObfuscatedFooSubClass.

  • 0

I have a dll named ExpensiveAndLargeObfuscatedFoo.dll.
Lets says it defines a type named ExpensiveAndLargeObfuscatedFooSubClass.
It’s been compiled for .NET.

Are there any tools (free, paid, whatever) that will generate c# or vb class files that will do nothing but wrap around everything defined in this expensive dll? That way I can add functionality, fix bugs (that CorpFUBAR won’t fix), add logging, etc?

Literally, I want output that looks like this

namespace easytoread {
    public class SubClass {
        private ExpensiveAndLargeObfuscatedFoo.SubClass _originalSubClass;
        public SubClass() {
            this._originalSubClass = new ExpensiveAndLargeObfuscatedFoo.SubClass ();
        }
        public string StupidBuggyMethod(string param1,int param2) {
            return _originalSubClass.StupidBuggyMethod(param1, param2);
        }
    }
}

It would have to handle custom return types as well as primitives

namespace easytoread {
    public class SubFooClass {
        private ExpensiveAndLargeObfuscatedFoo.SubFooClass _originalSubFooClass;
        public SubFooClass() {
            this._originalSubFooClass= new ExpensiveAndLargeObfuscatedFoo.SubFooClass ();
        }
        private SubFooClass(ExpensiveAndLargeObfuscatedFoo.SubFooClass orig) {
            this._originalSubFooClass = orig;
        }
        public SubFooClass StupidBuggyMethod(string param1,int param2) {
            return new SubFooClass(_originalSubFooClass.StupidBuggyMethod(param1, param2));
        }
    }
}

And so on and so forth for every single defined class.

Basically, poor mans dynamic proxy? (yay, Castle Project is awesome!)

We’d also like to rename some of our wrapper classes, but the tool doesn’t need to do that.

Without renaming, we’d be able to replace the old assembly with our new generated one, change using statements and continue on like nothing happened (except the bugs were fixed!)

It just needs to examine the dll and do code generation. the generated code can even be VB.NET, or ironpython, or anything CLR.

This is a slippery slope and I’m not happy that I ended up here, but this seems to be the way to go. I looked at the Castle Project, but unless I’m mistaken that won’t work for two reasons: 1) I can’t rename anything (don’t ask), 2) none of the assemblies methods are declared virtual or even overridable. Even if they were, there’s hundreds of types I’d have to override manually, which doesn’t sound fun.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:37:18+00:00Added an answer on June 1, 2026 at 6:37 pm

    It seems the best answer is “There is no such tool”. So, I’ll be taking a stab at writing my own later as an off-hours project. If I ever get something useful working I’ll github it and update here.

    UPDATE
    Visual Studio 2012 Fakes seem to be promising. http://msdn.microsoft.com/en-us/library/tfs/hh549175(v=vs.110).aspx – we’ve moved on but I might try creating a fake and then dropping it in as a replacement dll sometime in the future

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

simple question, probably easy for you to answer. I have a dll named MigrationSteps.dll
I have a .NET v2.0 Dll that exposes a few classes to COM. The
Can you help me? I need to have subsonic.core.dll strongly named. How can I
I have several functions in an assembly dll named UserFunctions.dll , for example :
I've been programming a simple WinSock application in Visual Studio 2010. I have named
I have access to DLL named sstchca.dll on my system that provides functions to
I try to register a COM dll named MixCenter.dll . I have found out
I have a file named A/B/SomeFile.dll that gets generated by visual studio on each
I have a file like this compiled into a dll file and placed in
I have a DSL Tools solution. I need to add a weak-named reference to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.