Installing Shared Code

To demonstrate the installation and development processes, a simple application has been created that calls a method in an assembly. The main portion of this code is shown in Listing 6.5.

Listing 6.5. FooTest an Application to Test a Class Foo That Resides in FooLib
[STAThread]
static void Main(string[] args)
{
    FooLib.Foo f = new FooLib.Foo();
    Console.WriteLine("Foo: {0} ", f.Version);
}

This application references an assembly also in the project that implements the Version property, as shown in Listing 6.6.

Listing 6.6. Implementation of FooLib
 [assembly: AssemblyDelaySign(true)] [assembly: AssemblyKeyFile(@"..\..\pubfoo.snk")] [assembly: AssemblyVersion("1.2.*")] . . . public class Foo { public Foo() { } public string ...

Get .NET Common Language Runtime Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.