The short answer is no.
Long answer: you can generate something at compile time using MSBuild tasks, T4 templates or manually parse things or use Roslyn to analyze it.
If you need source code at runtime, you will definitely need to include the cs files in the deployed material, because there is no stable way to return the code. (However, you can try decompiling at runtime, but it will look ugly and not very accurate.)
source share