Programming with Microsoft Visual C++.NET 6ed [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Programming with Microsoft Visual C++.NET 6ed [Electronic resources] - نسخه متنی

George Shepherd, David Kruglinski

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید








Making the Assembly Usable


Once the assembly is compiled, it will include all the types listed in the source code. You can use the assembly in a couple of ways. The first way is to deploy it as a private assembly. That means any client application that wants to use the assembly gets its own copy of the assembly (which will appear somewhere in the AppBase directory structure). To use Ex32a as a private assembly, you need to do nothing else. Just make sure the client applications have access to it.

The second way to use the assembly is to deploy it as a global assembly. To do this, you need to sign the assembly and then put it in the Global Assembly Cache (GAC). To sign the assembly, you run the program named SN.exe using the following command line:

sn –k InsideVCNET.snk

Running the SN program generates a signature key file that includes private and public keys that give the assembly a strong name (hence the name SN.exe). To include the signature in the assembly, you include this line in the Assembly.cpp source code:

[assembly:AssemblyKeyFileAttribute("InsideVCNET.snk")];

The line adds the public and private keys to the assembly. You can then add the assembly to the cache using the GACUTIL utility:

gacutil –i ex32a.dll

The final point regarding Ex32a is that the default source code generated by wizard updates the version number over the assembly each time it's compiled. The following line in

AssemblyInfo.cpp is responsible:

// You can specify all the values or you can default the Revision
// and Build numbers by using the '*' as shown below:
[assembly:AssemblyVersionAttribute("1.0.*")];

You can change this directive to use a specific version number, or you can let the compiler build new versions with new numbers. Placing asterisks in the Build and Revision fields of the version signature (the third and fourth places of the build signature) causes the compiler to use date and time stamps for the build and revision numbers.


/ 319