O'Reilly logo

.NET Common Language Runtime Unleashed by Kevin Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required