You’re mixing a few concepts here.
You’ve got class wrappers, you’ve got code generators, you’ve got build-on-deploy. The solution you’re talking about works if you can safely build the application per deployment, which is a big assumption.
A different architectural approach might be to making your Logging feature an interface, and allowing any all implementations of that interface, and perhaps scanning for implementations of that interface at runtime.
Here’s an example of how you might make that work using Reflection:
In terms of deployment, you’re saying something like “This app logs to anything that implements
IMyLog, so if you want logging to work make sure you drop a DLL in the runtime directory that has an
IMyLog in it.”
My point is that you seem to be solving a deployment problem with a complicated workaround that might force you to compile the application individually for each installation. I’m suggesting that you consider solving the deployment problem at the point of deployment instead.