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
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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.