SmartAssembly是一種軟件保護(hù)和改進(jìn)工具,旨在幫助.NET開發(fā)商開發(fā)出更好的軟件。這個工具能混淆和保護(hù)你的.NET代碼,優(yōu)化你的.NET程序集,為更好的部署,最大限度地減少分配的大小,提高性能和增加了功能強(qiáng)大的錯誤報告和調(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ī)制
如果對.NET的應(yīng)用程序沒有進(jìn)行程序混淆,他很容易被反編譯。這將帶來給你帶來麻煩,尤其是你在程序上付出了很多的時間、精力和金錢。混淆程序是非常簡單的,而且還可以保護(hù)你的程序不受反編譯、破解和篡改的威脅。
或許你只是不想讓你的程序被曝光,或許你的整個經(jīng)營項目都依靠著你軟件中嵌入的IP。無論什么,SmartAssembly絕對保證你程序的安全。
多種形式的混淆和優(yōu)化
程序混淆能加大對你的應(yīng)用反編譯工程的難度,同時除去無用的代碼以及壓縮附加物,起到保護(hù)和簡化應(yīng)用的作用,并把不必要的混亂沖突減到最少。
調(diào)試
SmartAssembly能對混淆了的堆棧軌跡解碼,然后生成含有糾錯信息的pdb文檔。這個功能能夠讓你把匯編碼糾錯后輸入電子集成驅(qū)動器中,從而在出現(xiàn)異常情況時得到全部的堆棧軌跡。完成之后,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(有一些特殊情況)。
自動報錯
只有一種情況會比在軟件中找到錯誤更糟糕:那就是永遠(yuǎn)找不到錯誤。
大多數(shù)用戶不會去上報錯誤情況:記住關(guān)聯(lián)的細(xì)節(jié)是在技術(shù)上非常困難的。如果讓用戶通過一次快速的鼠標(biāo)點擊就告訴你所有的情況,豈不是更rong
自動報錯系統(tǒng)是一種處理特殊情況的手段,它自動安靜地收集錯誤發(fā)生時的細(xì)節(jié)信息。盡管報錯有很高的自主定制性,但一個典型的報錯系統(tǒng)是由全面的堆棧軌跡和特殊情況的環(huán)境細(xì)節(jié)信息組成(比如所有局部變量的值)。
用戶只需要點擊“傳送錯誤報告”--獲取具體信息不再令人感到麻煩。全部都會在報告里。

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