问题
I need to minify some C# code in a handful of Silverlight .cs and .xmal files. What are your tips for maintaining one code base and running a "tool" to generate minified code for a project?
Are there any tools (like Resharper) that will do this? If not fully, partially or assist in some way...
EDIT: I realize that there is no need for C# minification. This is an exercise that I'm doing that does not make sense on the face of it. (This is not homework.)
回答1:
How about a source-code obfuscator? They generally abbreviate names, etc - and certainly remove white space.
For example, here, with demo here (although you'd probably want to disable the string encoding if possible). Note that this isn't a direct recommendation: this is just the first hit I got for C# code obfuscator.
回答2:
Is that necessary? It was my understanding that the compiled .Net assembly would be sent across the wire, not the C# (or whatever language) source code.
回答3:
Here are two "Lessons Learned" posts from other 10k entrants:
Thoughts on the MIX 10K challenge
MIX09 10K Smart Coding Challenge
来源:https://stackoverflow.com/questions/350705/do-you-have-any-tips-for-c-sharp-minification