Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Great; Microsoft reintroduced DLL hell with .NET 2.0 SP1 [modified]

Great; Microsoft reintroduced DLL hell with .NET 2.0 SP1 [modified]

Scheduled Pinned Locked Moved The Lounge
csharpquestion
74 Posts 29 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joe Woodbury
    wrote on last edited by
    #1

    They added new overloaded methods to WaitHandle.WaitOne() which, if used, will break on systems that don't have SP1 installed. Mind you, the program will start without any complaint. I just wasted hours on that. Can we all chip in a buy a huge middle finger statue to build in front of Microsoft headquarters? (To counteract the virtual one they are showing to us.) ADDED: So everyone understands. Microsoft added some overloaded methods between .NET 2.0 and .NET 2.0 SP1. (Not between major versions, mind you, but between service packs!) Let me repeat; Microsoft changed an interface with a service pack.

    Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

    modified on Wednesday, October 8, 2008 12:48 PM

    M G K R R 16 Replies Last reply
    0
    • J Joe Woodbury

      They added new overloaded methods to WaitHandle.WaitOne() which, if used, will break on systems that don't have SP1 installed. Mind you, the program will start without any complaint. I just wasted hours on that. Can we all chip in a buy a huge middle finger statue to build in front of Microsoft headquarters? (To counteract the virtual one they are showing to us.) ADDED: So everyone understands. Microsoft added some overloaded methods between .NET 2.0 and .NET 2.0 SP1. (Not between major versions, mind you, but between service packs!) Let me repeat; Microsoft changed an interface with a service pack.

      Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

      modified on Wednesday, October 8, 2008 12:48 PM

      M Offline
      M Offline
      Member 96
      wrote on last edited by
      #2

      Come on, what's with all the Microsoft hating around here lately? You know if you've been through the wars as I have that's a far cry from dll hell in the classic sense and it's dead easy to check for the version of .net installed in both an installer and in code that relies on something.


      "It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson

      J S 2 Replies Last reply
      0
      • J Joe Woodbury

        They added new overloaded methods to WaitHandle.WaitOne() which, if used, will break on systems that don't have SP1 installed. Mind you, the program will start without any complaint. I just wasted hours on that. Can we all chip in a buy a huge middle finger statue to build in front of Microsoft headquarters? (To counteract the virtual one they are showing to us.) ADDED: So everyone understands. Microsoft added some overloaded methods between .NET 2.0 and .NET 2.0 SP1. (Not between major versions, mind you, but between service packs!) Let me repeat; Microsoft changed an interface with a service pack.

        Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

        modified on Wednesday, October 8, 2008 12:48 PM

        G Offline
        G Offline
        Graham Bradshaw
        wrote on last edited by
        #3

        But surely you need to make sure that the correct version of the .NET runtime is installed anyway? Am I missing something here? It seems to me you are saying "If I use a function not supported by the installed runtime, bad things happen". * Graham goes back to coding all-statically-linked C++ programs *

        J 1 Reply Last reply
        0
        • M Member 96

          Come on, what's with all the Microsoft hating around here lately? You know if you've been through the wars as I have that's a far cry from dll hell in the classic sense and it's dead easy to check for the version of .net installed in both an installer and in code that relies on something.


          "It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson

          J Offline
          J Offline
          Joe Woodbury
          wrote on last edited by
          #4

          John C wrote:

          it's dead easy to check for the version of .net installed in both an installer and in code that relies on something

          In an embedded environment? You miss the point--Microsoft made a pledge that .NET wouldn't do this and it does. I've been through the wars and the DLL hell problem was largely one of Microsoft's making (they refused to version their own DLLs by name and still do!) Still, .NET was allegedly going to solve this it hasn't. SxS was supposed to solve it, it just introduced even more problems (like giving very vague errors when it can't find the proper DLL.)

          Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

          P P H 3 Replies Last reply
          0
          • G Graham Bradshaw

            But surely you need to make sure that the correct version of the .NET runtime is installed anyway? Am I missing something here? It seems to me you are saying "If I use a function not supported by the installed runtime, bad things happen". * Graham goes back to coding all-statically-linked C++ programs *

            J Offline
            J Offline
            Joe Woodbury
            wrote on last edited by
            #5

            Microsoft added some overloaded methods between .NET 2.0 and .NET 2.0 SP1. (Not between major versions, mind you, but between service packs.)

            Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

            G 1 Reply Last reply
            0
            • J Joe Woodbury

              Microsoft added some overloaded methods between .NET 2.0 and .NET 2.0 SP1. (Not between major versions, mind you, but between service packs.)

              Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

              G Offline
              G Offline
              Graham Bradshaw
              wrote on last edited by
              #6

              I still don't get the problem. New methods are in .NET 2.0 SP1. Fine. If you want your program to call them, surely you need to make sure .NET 2.0 SP1 is installed? Isn't that the case for any new version / service pack of the framework. If you want to use the new stuff, the new stuff has to be installed. As alluded to in my last post, I work in C++, not .NET. I'm not having a go at you at all - I just don't understand what the problem is.

              J D 2 Replies Last reply
              0
              • J Joe Woodbury

                They added new overloaded methods to WaitHandle.WaitOne() which, if used, will break on systems that don't have SP1 installed. Mind you, the program will start without any complaint. I just wasted hours on that. Can we all chip in a buy a huge middle finger statue to build in front of Microsoft headquarters? (To counteract the virtual one they are showing to us.) ADDED: So everyone understands. Microsoft added some overloaded methods between .NET 2.0 and .NET 2.0 SP1. (Not between major versions, mind you, but between service packs!) Let me repeat; Microsoft changed an interface with a service pack.

                Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                modified on Wednesday, October 8, 2008 12:48 PM

                K Offline
                K Offline
                Kevin McFarlane
                wrote on last edited by
                #7

                The SP thing has been muddled for years with Microsoft. In some cases they're pure bug fixes. In others they're bug fixes + new functionality (e.g., VS 2008 SP1). In the past they've said that "SPs will be pure bug fixes from now on." But they never stick to this.

                Kevin

                1 Reply Last reply
                0
                • G Graham Bradshaw

                  I still don't get the problem. New methods are in .NET 2.0 SP1. Fine. If you want your program to call them, surely you need to make sure .NET 2.0 SP1 is installed? Isn't that the case for any new version / service pack of the framework. If you want to use the new stuff, the new stuff has to be installed. As alluded to in my last post, I work in C++, not .NET. I'm not having a go at you at all - I just don't understand what the problem is.

                  J Offline
                  J Offline
                  Joe Woodbury
                  wrote on last edited by
                  #8

                  How can you not get it? The contract with .NET is that if an interface changes, the version would change and a program written to that version would not work on a previous version. You don't change interfaces with a service pack, only with a new version. To make this even more complicated, when using Visual Studio, intellisense picks up the new interface and lets you use it WITH NO WARNING THAT IT APPLIES ONLY TO SP1. In the real world, this means someone writing software for our embedded device could use methods that Visual Studio shows as being valid and then the software fails on the device, sometimes without a clear error as to why (yes, an exception should be thrown and caught, but that's not always what you actually see.) Because of the way Microsoft did the service packs for .NET, they are super expensive to put on our devices.

                  Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                  M M J F H 5 Replies Last reply
                  0
                  • J Joe Woodbury

                    They added new overloaded methods to WaitHandle.WaitOne() which, if used, will break on systems that don't have SP1 installed. Mind you, the program will start without any complaint. I just wasted hours on that. Can we all chip in a buy a huge middle finger statue to build in front of Microsoft headquarters? (To counteract the virtual one they are showing to us.) ADDED: So everyone understands. Microsoft added some overloaded methods between .NET 2.0 and .NET 2.0 SP1. (Not between major versions, mind you, but between service packs!) Let me repeat; Microsoft changed an interface with a service pack.

                    Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                    modified on Wednesday, October 8, 2008 12:48 PM

                    R Offline
                    R Offline
                    Rama Krishna Vavilala
                    wrote on last edited by
                    #9

                    Yes there are some new classes with .NET 2.0 SP1 which are automatically available if you using .NET 3.5 (the whole .NET naming is confusing). Anyway, if you run VS 2008 Code Analysis on your projects (BTW I highly recommend that for anyone), you will get warnings for all these situations.

                    Proud to be a CPHog user

                    1 Reply Last reply
                    0
                    • G Graham Bradshaw

                      I still don't get the problem. New methods are in .NET 2.0 SP1. Fine. If you want your program to call them, surely you need to make sure .NET 2.0 SP1 is installed? Isn't that the case for any new version / service pack of the framework. If you want to use the new stuff, the new stuff has to be installed. As alluded to in my last post, I work in C++, not .NET. I'm not having a go at you at all - I just don't understand what the problem is.

                      D Offline
                      D Offline
                      Daniel Grunwald
                      wrote on last edited by
                      #10

                      The problem is that while Visual Studio has compiler options to ensure you target only .NET 2.0 / .NET 3.0 / .NET 3.5 assemblies, it doesn't have any options to ensure you're using only methods from the service pack level you're targeting. If you install VS08, VS05 will see some additional methods and you can end up accidentally using them! Even the MSDN documentation often doesn't say correctly in which service pack the method was introduced. However, I think I've seen an FxCop task somewhere that can check that you use only methods from a specific service pack level.

                      S 1 Reply Last reply
                      0
                      • J Joe Woodbury

                        They added new overloaded methods to WaitHandle.WaitOne() which, if used, will break on systems that don't have SP1 installed. Mind you, the program will start without any complaint. I just wasted hours on that. Can we all chip in a buy a huge middle finger statue to build in front of Microsoft headquarters? (To counteract the virtual one they are showing to us.) ADDED: So everyone understands. Microsoft added some overloaded methods between .NET 2.0 and .NET 2.0 SP1. (Not between major versions, mind you, but between service packs!) Let me repeat; Microsoft changed an interface with a service pack.

                        Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                        modified on Wednesday, October 8, 2008 12:48 PM

                        R Offline
                        R Offline
                        Rocky Moore
                        wrote on last edited by
                        #11

                        I agree with you. There should have been a version change or leave the changes out.

                        Rocky <>< Recent Blog Post: Browser Wars – IE lost – Firefox rising..

                        C 1 Reply Last reply
                        0
                        • M Member 96

                          Come on, what's with all the Microsoft hating around here lately? You know if you've been through the wars as I have that's a far cry from dll hell in the classic sense and it's dead easy to check for the version of .net installed in both an installer and in code that relies on something.


                          "It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson

                          S Offline
                          S Offline
                          Shog9 0
                          wrote on last edited by
                          #12

                          John C wrote:

                          that's a far cry from dll hell in the classic sense

                          Sounds pretty close to the insanity surrounding MFC42.dll, actually. I seem to recall spending hours tearing out my hair in frustration while trying to track down the cause of problems on Win9x... only to find that an older version was loaded in memory and calls were subtly failing because of it. This was actually possible to fix once we killed support for Win9x, since it was possible then to ensure our own private copy of the DLL got loaded... i doubt that's an option for the .NET runtime.

                          ----

                          You're right. These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets.

                          M 1 Reply Last reply
                          0
                          • D Daniel Grunwald

                            The problem is that while Visual Studio has compiler options to ensure you target only .NET 2.0 / .NET 3.0 / .NET 3.5 assemblies, it doesn't have any options to ensure you're using only methods from the service pack level you're targeting. If you install VS08, VS05 will see some additional methods and you can end up accidentally using them! Even the MSDN documentation often doesn't say correctly in which service pack the method was introduced. However, I think I've seen an FxCop task somewhere that can check that you use only methods from a specific service pack level.

                            S Offline
                            S Offline
                            Scott Dorman
                            wrote on last edited by
                            #13

                            Daniel Grunwald wrote:

                            However, I think I've seen an FxCop task somewhere that can check that you use only methods from a specific service pack level.

                            Yes, there is an FxCop rule that can be used for this: http://blogs.msdn.com/fxcop/archive/2008/08/25/new-for-visual-studio-2008-sp1-and-fxcop-1-36-multi-targeting-rule.aspx[^]

                            Daniel Grunwald wrote:

                            The problem is that while Visual Studio has compiler options to ensure you target only .NET 2.0 / .NET 3.0 / .NET 3.5 assemblies

                            The real problem here is that once you install one of the service packs, you're actually targetting the SP not the base RTM version. In this scenario, even though VS shows .NET 2.0 it's really .NET 2.0 SP1.

                            Scott Dorman

                            Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


                            Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

                            1 Reply Last reply
                            0
                            • J Joe Woodbury

                              They added new overloaded methods to WaitHandle.WaitOne() which, if used, will break on systems that don't have SP1 installed. Mind you, the program will start without any complaint. I just wasted hours on that. Can we all chip in a buy a huge middle finger statue to build in front of Microsoft headquarters? (To counteract the virtual one they are showing to us.) ADDED: So everyone understands. Microsoft added some overloaded methods between .NET 2.0 and .NET 2.0 SP1. (Not between major versions, mind you, but between service packs!) Let me repeat; Microsoft changed an interface with a service pack.

                              Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                              modified on Wednesday, October 8, 2008 12:48 PM

                              S Offline
                              S Offline
                              Scott Dorman
                              wrote on last edited by
                              #14

                              So...getting past the fact that Microsoft broke things for you application with the introduction of a Service Pack, I see a few options here: You can ensure that your application is not calling the new SP1 overload on WaitHandle.WaitOne(), which will ensure that the application will behave properly on .NET 2.0 and .NET 2.0 SP1. You can add code in your application's startup to test for the correct version of .NET and take the appropriate action. You can take a look at this article[^] for a .NET way to do this. You can test for the correct version of .NET at install time and only install if the proper version and service pack are installed. If you want to do this correctly, you will need to write some C++ code (see the article I referenced earlier for links on some C++ code to do this).

                              Scott Dorman

                              Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


                              Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

                              R 1 Reply Last reply
                              0
                              • S Shog9 0

                                John C wrote:

                                that's a far cry from dll hell in the classic sense

                                Sounds pretty close to the insanity surrounding MFC42.dll, actually. I seem to recall spending hours tearing out my hair in frustration while trying to track down the cause of problems on Win9x... only to find that an older version was loaded in memory and calls were subtly failing because of it. This was actually possible to fix once we killed support for Win9x, since it was possible then to ensure our own private copy of the DLL got loaded... i doubt that's an option for the .NET runtime.

                                ----

                                You're right. These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets.

                                M Offline
                                M Offline
                                Member 96
                                wrote on last edited by
                                #15

                                The mfc files were the least of my problems back in the day, throw in Crystal Reports with it's own dll hell and requirements and several other third party apps and it quickly spiraled into a support nightmare. Checking for one single version of the .net framework is a cakewalk by comparison.


                                "It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson

                                S 1 Reply Last reply
                                0
                                • J Joe Woodbury

                                  How can you not get it? The contract with .NET is that if an interface changes, the version would change and a program written to that version would not work on a previous version. You don't change interfaces with a service pack, only with a new version. To make this even more complicated, when using Visual Studio, intellisense picks up the new interface and lets you use it WITH NO WARNING THAT IT APPLIES ONLY TO SP1. In the real world, this means someone writing software for our embedded device could use methods that Visual Studio shows as being valid and then the software fails on the device, sometimes without a clear error as to why (yes, an exception should be thrown and caught, but that's not always what you actually see.) Because of the way Microsoft did the service packs for .NET, they are super expensive to put on our devices.

                                  Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                                  M Offline
                                  M Offline
                                  Member 96
                                  wrote on last edited by
                                  #16

                                  Yes it's shitty what they did but it's easily overcome now that you know. I feel your pain and outrage but at the end of the day it's all about getting the job done however necessary. Programming is nothing if not endless sets of compromises between the ideal and the real.


                                  "It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson

                                  J 1 Reply Last reply
                                  0
                                  • M Member 96

                                    Yes it's shitty what they did but it's easily overcome now that you know. I feel your pain and outrage but at the end of the day it's all about getting the job done however necessary. Programming is nothing if not endless sets of compromises between the ideal and the real.


                                    "It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson

                                    J Offline
                                    J Offline
                                    Joe Woodbury
                                    wrote on last edited by
                                    #17

                                    John C wrote:

                                    Programming is nothing if not endless sets of compromises between the ideal and the real.

                                    Oh, I thought it was endless sets of compromises between sucks and sucks less.

                                    Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                                    M M C 3 Replies Last reply
                                    0
                                    • M Member 96

                                      The mfc files were the least of my problems back in the day, throw in Crystal Reports with it's own dll hell and requirements and several other third party apps and it quickly spiraled into a support nightmare. Checking for one single version of the .net framework is a cakewalk by comparison.


                                      "It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson

                                      S Offline
                                      S Offline
                                      Shog9 0
                                      wrote on last edited by
                                      #18

                                      John C wrote:

                                      throw in Crystal Reports with its own dll hell and requirements

                                      Don't remind me of CR. We are still living with that madness.

                                      John C wrote:

                                      Checking for one single version of the .net framework is a cakewalk by comparison.

                                      Maybe so, but still it's a case where the OS loader has that functionality already built-in, and would already work if MS wasn't lazy/schizo about versioning (assuming i understand the issue correctly, this is a side-effect of using 2.0 as the base for 3.5 - changes to core components for 3.5 must be made to 2.0 assemblies).

                                      ----

                                      You're right. These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets.

                                      M 1 Reply Last reply
                                      0
                                      • J Joe Woodbury

                                        John C wrote:

                                        Programming is nothing if not endless sets of compromises between the ideal and the real.

                                        Oh, I thought it was endless sets of compromises between sucks and sucks less.

                                        Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                                        M Offline
                                        M Offline
                                        Member 96
                                        wrote on last edited by
                                        #19

                                        That too depending on if your a glass half full or half empty type of dude. :)


                                        "It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson

                                        H 1 Reply Last reply
                                        0
                                        • J Joe Woodbury

                                          How can you not get it? The contract with .NET is that if an interface changes, the version would change and a program written to that version would not work on a previous version. You don't change interfaces with a service pack, only with a new version. To make this even more complicated, when using Visual Studio, intellisense picks up the new interface and lets you use it WITH NO WARNING THAT IT APPLIES ONLY TO SP1. In the real world, this means someone writing software for our embedded device could use methods that Visual Studio shows as being valid and then the software fails on the device, sometimes without a clear error as to why (yes, an exception should be thrown and caught, but that's not always what you actually see.) Because of the way Microsoft did the service packs for .NET, they are super expensive to put on our devices.

                                          Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                                          M Offline
                                          M Offline
                                          Mark Salsbery
                                          wrote on last edited by
                                          #20

                                          Joe Woodbury wrote:

                                          The contract with .NET is

                                          Yours came with a contract?

                                          Mark Salsbery Microsoft MVP - Visual C++ :java:

                                          J 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups