Do you have any tips for C# Minification? [closed]

╄→гoц情女王★ 提交于 2019-12-06 07:36:37

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!