unable to read a new version of assembly with a configuration policy

  • 13 years ago

    hi all

    I have created two assemblies different in version number. Just to test them i have included an output statement to know which one called based a configuration file. I have included them in the GAC using gacuitl tool. I opened the configuration tool and added the application under the tree view node "Applications". In the configured assemblies option under my added application i created the assemblies configuration.

    After this i found the myapp.exe.confi file along with the myapp.exe in the folder bin/debug. Unitl this time things were fine but when i run the application i get the text out put of the first dll not the new one and the configuration file would be deleted at run time from the folder.

    What will be the cause ?

    The two assemblies were

     

    greeting / version 1.0.0.0

    using

    System;

    namespace

    Greeting

    {

    public class Hello

    {

    public static void SayHello()

    {

    Console.WriteLine("Version 2 of the greeting DLL.");

    }

    }

    }

     

    greeting / version 2.0.0.0

    using

    System;

    namespace

    Greeting

    {

    public class Hello

    {

    public static void SayHello()

    {

    Console.WriteLine("Hello, world. Version 1.");

    }

    }

    }

    // Testing program

    using

    System;

    using

    Greeting;

    namespace

    GreetingTest

    {

    class Class1

    {

    [STAThread]

    static void Main(string[] args)

    {

    Hello.SayHello();

    Console.WriteLine("Press Enter to exit.");

    Console.ReadLine();

    }

    }

    }

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Nine people can't make a baby in a month.” - Fred Brooks