[CLR VIA C#] chapter2 building,packaging,deploying, and administering

今天整理一下 assembly, 总感觉第一章 到 第三章 没怎么仔细看, 导致后面作者说前面说过的, 我就心里不舒服, 前面3章很干很涩, 好好啃啃, 先作一些简单笔记, 最后再来 整体整理, 反正还要做PPT, 哎 自作孽啊~

多文件的Assembly

放在Internet 上面下载, Active Accessibility, code base 定义 URL,

多文件assembly 优点.

可以按类型分类文件,按需增量下载文件,分批打包部署.

可以向程序集中添加资源或者数据文件 AL.exe.

各个类型文件可以用不同语言来写,ILDasm.exe 获得IL code,ILAsm.exe把所有程序打包.

PE 文件,清单

/t:exe /t:winexe /t:library

/t:module 不含清单,生成.netmodule后缀文件

/addmodule

eg:

rut.cs + fut.cs

csc /t:module rut.cs  -> rut.netmodule

csc /out:TypeMe.dll /t:library /addmodule:rut.netmodule fut.cs

rut.netmodule 在 ExportedTypesDef 中 (exported 出口)

token请查corhdr.h

添加assembly IDE VS

assembly 出现在.net tab, 修改 HLMsoftwaremicrosoft.netframeworkassemblyfoldersmylibname  或者 HCU

为程序集添加资源文件

AL.EXE

/embed[resource]  /link[resource]

csc.exe

/resource /linkresource

/win32res  /win32icon

版本信息

System.Diagnostics.FileVersionInfo.GetVersionInfo    (Diagnostics [ˌdaɪəɡˈnɑstɪk] 诊断)

AL.exe /fileversion /productversion

major  minor  build  revision  (revision [rɪˈvɪʒ(ə)n] 修订)

AssemblyFileVersion  win32

AssemblyInformationalVersion win32

AssemblyVersion AssemblyDef

question:能否相同呢???比如上次的 fileversion 和这次的fileversion, informationalverison是干什么用的呢?

语言文化

culture neutral  (neutral [ˈnutrəl] 中立)

satellite assembly 附属程序集

AL.exe /c[ulture]:text

System.Resources.ResourceManager

question:怎么执行本地化呢???

简单的部署

注册表

.cab msi clickonce

简单管理控制(配置)

配置文件 xml

<probing privatePath=”” /> string semicolon delimited  路径, 只能相对路径, 不能绝对路径

Machine config  %SystemRoot%Microsoft.NetFrameworkVersionCONFIG

第二章 Summary

csc.exe /out: /t: /r

response files @###.rsp csc.rsp(framework64 folder)

metadata

combine module:

advantage/why      changes in metadata    /t:module->netmodule /addmodule  IDE

AL.exe csc.exe

version major minor build revision

culture

deploy/control

把第二章发出去吧, 这样比较有成就感, 终于看完一章, 再也不用一遍一遍看, 还不知道说的是什么了. happy~

原文地址:https://www.cnblogs.com/guaiguai9/p/3238329.html