SmartAssembly是一種軟件保護(hù)和改進(jìn)工具,旨在幫助.NET開發(fā)商開發(fā)出更好的軟件。這個(gè)工具能混淆和保護(hù)你的.NET代碼,優(yōu)化你的.NET程序集,為更好的部署,限度地減少分配的大小,提高性能和增加了功能強(qiáng)大的錯(cuò)誤報(bào)告和調(diào)試能力。
SmartAssembly is a software protection and improvement tool designed to help .NET developers to produce better quality software. This all-round solution will obfuscate and protect your .NET code, optimize your .NET assemblies for better deployment, minimize distribution size, increase performance, and add powerful error-reporting and debugging capabilities to your application.
SmartAssembly擁有三種途徑提升你的軟件功能:
混淆機(jī)制
如果對(duì).NET的應(yīng)用程序沒有進(jìn)行程序混淆,他很容易被反編譯。這將帶來給你帶來麻煩,尤其是你在程序上付出了很多的時(shí)間、精力和金錢?;煜绦蚴欠浅:?jiǎn)單的,而且還可以保護(hù)你的程序不受反編譯、破解和篡改的威脅。
或許你只是不想讓你的程序被曝光,或許你的整個(gè)經(jīng)營(yíng)項(xiàng)目都依靠著你軟件中嵌入的IP。無論什么,SmartAssembly保證你程序的安全。
多種形式的混淆和優(yōu)化
程序混淆能加大對(duì)你的應(yīng)用反編譯工程的難度,同時(shí)除去無用的代碼以及壓縮附加物,起到保護(hù)和簡(jiǎn)化應(yīng)用的作用,并把不必要的混亂沖突減到最少。
調(diào)試
SmartAssembly能對(duì)混淆了的堆棧軌跡解碼,然后生成含有糾錯(cuò)信息的pdb文檔。這個(gè)功能能夠讓你把匯編碼糾錯(cuò)后輸入電子集成驅(qū)動(dòng)器中,從而在出現(xiàn)異常情況時(shí)得到全部的堆棧軌跡。完成之后,SmartAssembly甚至能釋放不需要的內(nèi)存。
集成與支持
通過MS Build或者指令可以讓混淆功能構(gòu)建到過程中。混淆功能還支持 .NET 2.0到4.0,Compact Framework 2.0到3.5,Sliverlight 2.0到5.0,XNA(xBox,PC應(yīng)用),以及Windows Phone 7(有一些特殊情況)。
自動(dòng)報(bào)錯(cuò)
只有一種情況會(huì)比在軟件中找到錯(cuò)誤更糟糕:那就是永遠(yuǎn)找不到錯(cuò)誤。
大多數(shù)用戶不會(huì)去上報(bào)錯(cuò)誤情況:記住關(guān)聯(lián)的細(xì)節(jié)是在技術(shù)上非常困難的。如果讓用戶通過一次快速的鼠標(biāo)點(diǎn)擊就告訴你所有的情況,豈不是更rong
自動(dòng)報(bào)錯(cuò)系統(tǒng)是一種處理特殊情況的手段,它自動(dòng)安靜地收集錯(cuò)誤發(fā)生時(shí)的細(xì)節(jié)信息。盡管報(bào)錯(cuò)有很高的自主定制性,但一個(gè)典型的報(bào)錯(cuò)系統(tǒng)是由全面的堆棧軌跡和特殊情況的環(huán)境細(xì)節(jié)信息組成(比如所有局部變量的值)。
用戶只需要點(diǎn)擊“傳送錯(cuò)誤報(bào)告”--獲取具體信息不再令人感到麻煩。全部都會(huì)在報(bào)告里。

在有兩種主要的情況下,自動(dòng)報(bào)錯(cuò)會(huì)顯得格外有用:
自動(dòng)報(bào)錯(cuò)有什么優(yōu)勢(shì)?
只需要幾秒鐘便可配置和添加異常處理到的應(yīng)用程序中,無需改變代碼,而且還可以給你許多重要的回饋
無需再為獲得所有必要的細(xì)節(jié),而不停地發(fā)電子郵件。你的用戶將只需點(diǎn)擊一個(gè)按鈕就可以反應(yīng)無法處理的特殊情況,也就是說你能更快地修復(fù)錯(cuò)誤。
你能連續(xù)不斷地得到信息:如哪些錯(cuò)誤反復(fù)出現(xiàn)。這樣就可以幫助你優(yōu)先處理影響用戶最多的問題。
通過先辨別然后修復(fù)用戶所遇到的問題可以降低你的技術(shù)支持成本。
合成動(dòng)態(tài)鏈接庫
編譯 .NET 代碼通常會(huì)生成多個(gè)匯編碼文檔,包括附屬DLLs,所有的這些文檔都是運(yùn)行程序必要的部分。雖然在開發(fā)過程中這還不算問題,但是在完成后就意味著由于DLLs被移到的地方,用戶將遇到必須解壓文件這一不必要的階段,或者一些額外的安裝步驟。
通過SmartAssembly,你能夠從相關(guān)連的DLLs中把代碼合成并嵌入到你的主匯編文件里,這樣會(huì)很大程度上簡(jiǎn)化開發(fā)過程。
關(guān)聯(lián)文件合成
合成將選取所有DLLs,然后融合關(guān)聯(lián)文件到主匯編文件中,這樣你就不用讀取許多的DLL文檔了。當(dāng)關(guān)聯(lián)文件被合成后,文件就會(huì)成為主文件的一部分,那么合成后關(guān)聯(lián)文件中的代碼以及主文件中的代碼都將會(huì)被混淆和修剪。
關(guān)聯(lián)文件壓縮和嵌入
壓縮和嵌入功能允許將相關(guān)DLLs作為資源文件嵌入到主匯編文件的內(nèi)容中。這項(xiàng)功能也是先壓縮這些資源文件,然后在運(yùn)行時(shí)對(duì)其動(dòng)態(tài)解壓。

3 ways SmartAssembly will improve your software:
Obfuscation
.NET applications are easy to disassemble if they haven't been obfuscated, which is obviously a problem if you've invested time, effort, and money in your code. Obfuscating your code is easy to do, and helps protect it against reverse-engineering, cracking, and modification.
Maybe you just don't want your code exposed, or maybe your entire business rests on the IP embodied in your software; SmartAssembly makes sure that your code is well-protected.
Multiple forms of Obfuscation and Optimization
Code Obfuscation makes your application hard to reverse-engineer, removes non-useful code, and compresses dependencies, protecting and compacting your application with a minimum of fuss.
Debugging
SmartAssembly decodes obfuscated stack traces and generates .pdb files containing debugging information. This enables you to debug your assembly into your IDE, and get the full stack trace when an exception occurs. To top it off, SmartAssembly even helps to ensure that you're automatically releasing unneeded memory.
Integration and Support
Obfuscation can be integrated into build processes using MS Build or command-line, and supports .NET 2.0 to 4.0, Compact Framework 2.0 to 3.5, Silverlight 2.0 to 5.0, XNA (xbox, PC applications), and Windows Phone 7, with some exceptions – see PDF for details.
Automated Error Reporting
Only one thing's worse than finding out your software has bugs: never finding out.
Most users won't bother to report bugs: it's tricky and technically challenging to remember and relate the details. It would be easier for everyone if you let your users just give you the whole story in one quick click, wouldn't it?
Automated Error Reporting is an exception handling mechanism that automatically and silently collects detailed information when errors occur. Although highly customizable, a typical error report consists of a full stack trace and details about the exception context (e.g. values of all the local variables).
The user just has to click "Send error reports" – no painful back and forth to get all the details. It's all there.

There are two main circumstances where Automated Error Reporting is particularly useful:
- In the pre-release phase (e.g. beta testing), when you want lots of early user feedback to help you ship a stable application.
- In post-release maintenance, when you want to streamline and speed up the process of debugging and fixing your software.
What are the benefits of Automated Error Reporting?
- Configuring and adding exception handling to your application takes seconds, involves very few changes to your code, yet gives you access to stacks of valuable feedback.
- No more time-consuming exchanges to get all the necessary details. Your end-users can report unhandled exceptions at the click of a button, meaning you can fix bugs faster.
- You get continuous data on which unhandled exceptions are most recurrent, helping you prioritize the bugs which affect the most end-users.
- You can lower support costs by identifying and fixing the issues your end-users are actually experiencing.
Merging DLLs
Compiling .NET code often results in multiple assembly files being created, including satellite DLLs, all of which are required for the program to run. While this is a non-issue during development, when it comes to deployment it often means an unwanted stage of users having to unzip files, or additional steps in the installer as DLLs are moved to specific places.
You can dramatically simplify your deployment process by using SmartAssembly to merge and embed the code from referenced DLLs into your main assembly.
Dependency Merging
- Deploy your .NET application in one file
- Improve the performance and protection of your software
Dependency merging takes all the DLLs and merges dependencies into the main assembly so you don't have to load lots of DLL files. When a dependency is merged, it becomes a part of the main assembly and the code from a merged dependency can therefore be obfuscated and pruned as well as code from the main assembly.
Dependencies Compression & Embedding
- Facilitate your software deployment and maintenance
- Reduce the size of your program
Dependencies compression and embedding allows referenced DLLs to be embedded into the main assembly as resources, instead of being merged into the main assembly's contents. This feature also compresses these resources and dynamically uncompresses them at runtime.
