.NET components version control and consistency

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ostap Radkovskiy

    #1

    .NET components version control and consistency

    Hi!

    How can I achieve the situation like that:
    there is some application (.NET) and it is using some class library
    (strongly named, installed by .msi, registered within GAC). I'd like to have
    a crash on my client application when the class library version differs from
    the one compiled with my application earlier e.g. my_app_version1 and
    my_class_lib_ve rsion1 works fine but my_app_version1 and
    my_class_lib_ve rsion2 cause crash.

    I have one approach but it doesn't fit my scheme: to pool all the assembly
    strings out of code to .config file and supply them with version numbers
    (then my class factories will not be able to instantiate some objects
    because there will be a different version)

    Thanks in advance for any advises/suggestions!



  • Nick Holmes

    #2
    Re: .NET components version control and consistency

    If I read your mail correctly, you are describing the default behaviour of
    the runtime, so you dont have to do anything.
    [color=blue]
    >I'd like to have a crash on my client application[/color]

    Your application won't crash, it just will not start.

    Nick Holmes.


    "Ostap Radkovskiy" <oradkov@softse rvecom.com> wrote in message
    news:e6Tfin7REH A.3944@tk2msftn gp13.phx.gbl...[color=blue]
    > Hi!
    >
    > How can I achieve the situation like that:
    > there is some application (.NET) and it is using some class library
    > (strongly named, installed by .msi, registered within GAC). I'd like to[/color]
    have[color=blue]
    > a crash on my client application when the class library version differs[/color]
    from[color=blue]
    > the one compiled with my application earlier e.g. my_app_version1 and
    > my_class_lib_ve rsion1 works fine but my_app_version1 and
    > my_class_lib_ve rsion2 cause crash.
    >
    > I have one approach but it doesn't fit my scheme: to pool all the assembly
    > strings out of code to .config file and supply them with version numbers
    > (then my class factories will not be able to instantiate some objects
    > because there will be a different version)
    >
    > Thanks in advance for any advises/suggestions!
    >
    >
    >[/color]


    Comment

    • Ostap Radkovskiy

      #3
      Re: .NET components version control and consistency

      Absolutely correct, thank you Nick.

      Now I've got the other point - to restrict application working with only
      certain lib version - e.g. I have some library installed, I'm building my
      project with that library although my project should work with it's older
      version. The project compiles successfully (no interface differences), but
      acutally there is an error prone situation because my project is expecting
      to execute the older functionality of the library. Here I'd like to get an
      error saying "wrong library/component version"

      Any ideas?

      Thank you.

      "Nick Holmes" <nickh@nospam.c om> wrote in message
      news:%23bfWhN8R EHA.3528@TK2MSF TNGP09.phx.gbl. ..[color=blue]
      > If I read your mail correctly, you are describing the default behaviour of
      > the runtime, so you dont have to do anything.
      >[color=green]
      > >I'd like to have a crash on my client application[/color]
      >
      > Your application won't crash, it just will not start.
      >
      > Nick Holmes.
      >
      >
      > "Ostap Radkovskiy" <oradkov@softse rvecom.com> wrote in message
      > news:e6Tfin7REH A.3944@tk2msftn gp13.phx.gbl...[color=green]
      > > Hi!
      > >
      > > How can I achieve the situation like that:
      > > there is some application (.NET) and it is using some class library
      > > (strongly named, installed by .msi, registered within GAC). I'd like to[/color]
      > have[color=green]
      > > a crash on my client application when the class library version differs[/color]
      > from[color=green]
      > > the one compiled with my application earlier e.g. my_app_version1 and
      > > my_class_lib_ve rsion1 works fine but my_app_version1 and
      > > my_class_lib_ve rsion2 cause crash.
      > >
      > > I have one approach but it doesn't fit my scheme: to pool all the[/color][/color]
      assembly[color=blue][color=green]
      > > strings out of code to .config file and supply them with version numbers
      > > (then my class factories will not be able to instantiate some objects
      > > because there will be a different version)
      > >
      > > Thanks in advance for any advises/suggestions!
      > >
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • phoenix

        #4
        Re: .NET components version control and consistency

        I think you're looking for 'strong naming'. Check out the article at
        Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology


        Yves

        "Ostap Radkovskiy" <oradkov@softse rvecom.com> schreef in bericht
        news:%23sdBtb8R EHA.3572@TK2MSF TNGP11.phx.gbl. ..[color=blue]
        > Absolutely correct, thank you Nick.
        >
        > Now I've got the other point - to restrict application working with only
        > certain lib version - e.g. I have some library installed, I'm building my
        > project with that library although my project should work with it's older
        > version. The project compiles successfully (no interface differences), but
        > acutally there is an error prone situation because my project is expecting
        > to execute the older functionality of the library. Here I'd like to get an
        > error saying "wrong library/component version"
        >
        > Any ideas?
        >
        > Thank you.
        >
        > "Nick Holmes" <nickh@nospam.c om> wrote in message
        > news:%23bfWhN8R EHA.3528@TK2MSF TNGP09.phx.gbl. ..[color=green]
        > > If I read your mail correctly, you are describing the default behaviour[/color][/color]
        of[color=blue][color=green]
        > > the runtime, so you dont have to do anything.
        > >[color=darkred]
        > > >I'd like to have a crash on my client application[/color]
        > >
        > > Your application won't crash, it just will not start.
        > >
        > > Nick Holmes.
        > >
        > >
        > > "Ostap Radkovskiy" <oradkov@softse rvecom.com> wrote in message
        > > news:e6Tfin7REH A.3944@tk2msftn gp13.phx.gbl...[color=darkred]
        > > > Hi!
        > > >
        > > > How can I achieve the situation like that:
        > > > there is some application (.NET) and it is using some class library
        > > > (strongly named, installed by .msi, registered within GAC). I'd like[/color][/color][/color]
        to[color=blue][color=green]
        > > have[color=darkred]
        > > > a crash on my client application when the class library version[/color][/color][/color]
        differs[color=blue][color=green]
        > > from[color=darkred]
        > > > the one compiled with my application earlier e.g. my_app_version1 and
        > > > my_class_lib_ve rsion1 works fine but my_app_version1 and
        > > > my_class_lib_ve rsion2 cause crash.
        > > >
        > > > I have one approach but it doesn't fit my scheme: to pool all the[/color][/color]
        > assembly[color=green][color=darkred]
        > > > strings out of code to .config file and supply them with version[/color][/color][/color]
        numbers[color=blue][color=green][color=darkred]
        > > > (then my class factories will not be able to instantiate some objects
        > > > because there will be a different version)
        > > >
        > > > Thanks in advance for any advises/suggestions!
        > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Ostap Radkovskiy

          #5
          Re: .NET components version control and consistency

          Thanks phoenix,

          strong naming is good (versioning stands on it). Although by itself, strong
          naming seems not to be able in solve my problem.

          "phoenix" <patient0@skyne tWORK.be> wrote in message
          news:%23rGXjV$R EHA.3628@TK2MSF TNGP12.phx.gbl. ..[color=blue]
          > I think you're looking for 'strong naming'. Check out the article at
          > http://www.ondotnet.com/pub/a/dotnet...ongnaming.html
          >
          > Yves
          >
          > "Ostap Radkovskiy" <oradkov@softse rvecom.com> schreef in bericht
          > news:%23sdBtb8R EHA.3572@TK2MSF TNGP11.phx.gbl. ..[color=green]
          > > Absolutely correct, thank you Nick.
          > >
          > > Now I've got the other point - to restrict application working with[/color][/color]
          only[color=blue][color=green]
          > > certain lib version - e.g. I have some library installed, I'm building[/color][/color]
          my[color=blue][color=green]
          > > project with that library although my project should work with it's[/color][/color]
          older[color=blue][color=green]
          > > version. The project compiles successfully (no interface differences),[/color][/color]
          but[color=blue][color=green]
          > > acutally there is an error prone situation because my project is[/color][/color]
          expecting[color=blue][color=green]
          > > to execute the older functionality of the library. Here I'd like to get[/color][/color]
          an[color=blue][color=green]
          > > error saying "wrong library/component version"
          > >
          > > Any ideas?
          > >
          > > Thank you.
          > >
          > > "Nick Holmes" <nickh@nospam.c om> wrote in message
          > > news:%23bfWhN8R EHA.3528@TK2MSF TNGP09.phx.gbl. ..[color=darkred]
          > > > If I read your mail correctly, you are describing the default[/color][/color][/color]
          behaviour[color=blue]
          > of[color=green][color=darkred]
          > > > the runtime, so you dont have to do anything.
          > > >
          > > > >I'd like to have a crash on my client application
          > > >
          > > > Your application won't crash, it just will not start.
          > > >
          > > > Nick Holmes.
          > > >
          > > >
          > > > "Ostap Radkovskiy" <oradkov@softse rvecom.com> wrote in message
          > > > news:e6Tfin7REH A.3944@tk2msftn gp13.phx.gbl...
          > > > > Hi!
          > > > >
          > > > > How can I achieve the situation like that:
          > > > > there is some application (.NET) and it is using some class library
          > > > > (strongly named, installed by .msi, registered within GAC). I'd like[/color][/color]
          > to[color=green][color=darkred]
          > > > have
          > > > > a crash on my client application when the class library version[/color][/color]
          > differs[color=green][color=darkred]
          > > > from
          > > > > the one compiled with my application earlier e.g. my_app_version1[/color][/color][/color]
          and[color=blue][color=green][color=darkred]
          > > > > my_class_lib_ve rsion1 works fine but my_app_version1 and
          > > > > my_class_lib_ve rsion2 cause crash.
          > > > >
          > > > > I have one approach but it doesn't fit my scheme: to pool all the[/color]
          > > assembly[color=darkred]
          > > > > strings out of code to .config file and supply them with version[/color][/color]
          > numbers[color=green][color=darkred]
          > > > > (then my class factories will not be able to instantiate some[/color][/color][/color]
          objects[color=blue][color=green][color=darkred]
          > > > > because there will be a different version)
          > > > >
          > > > > Thanks in advance for any advises/suggestions!
          > > > >
          > > > >
          > > > >
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...