|
C# 2008 Programmer's ReferenceSelect the Signing tab (see Figure 15-28), and check the Sign The Assembly checkbox. Select <New> from the Choose A Strong Name Key File dropdown list to specify a name for the strong name file. Figure 15-28 In the Create Strong Name Key dialog (see Figure 15-29), specify a name to store the pair of keys (KeyFile.snk, for instance). You also have the option to protect the file with a password. Click OK. Figure 15-29 An SNK file is a binary file containing the pair of public and private keys. A strong name file is now created in your project (see Figure 15-30). Figure 15-30 Alternatively, you can also use the command line to generate the strong name file: sn -k KeyFile.snk Versioning With .NET, you can create different versions of the same assembly and share them with other applications. To specify version information, you can edit the AssemblyInfo.cs file, located under the Properties item in Solution Explorer (see Figure 15-31). Figure 15-31 In the AssemblyInfo.cs file, locate the following lines: ... // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] The version number of an assembly is specified using the following format: [Major Version, Minor Version, Build Number, Revision] The AssemblyVersion attribute is used to identify the version number of an assembly ...» | Код для вставки книги в блог HTML
phpBB
текст
|
|