none
.net versions issue RRS feed

  • Question


  • Hi

    I have a .net 2.0 application that can dynamically load dll's implementing some interface.
    I now want to write such a dll in .net 3.5. Should I expect any problems with this on run time (e.g. can there be a collusion in imports or something)? I know that .net 3.5. comes with .net 2 sp1, how does this affect the situation?


    Thanks,
    Yaron
    Monday, April 21, 2008 2:16 PM

Answers

  • You can't have both 2.0 and 2.0SP1 on the same machine.  Installing .NET 3.5 or .NET 2.0SP1 updates your 2.0 framework version to 2.0.50727.1433.  If the machine is updated to 2.0SP1 your .NET 2.0 applications will automatically use that version.

     

    There are very few breaking changes, one thing off the top of my head is that DEP protection is enabled by default for images the C# compiler generates as of SP1.  This can break some old ATL components.  I've written on this in my blog in the past.

    Monday, April 21, 2008 5:30 PM

All replies

  • Hi Yaron,

     

    As far as I know .NET 2.0 sp1 does not contain any changes to CLR, only interfaces of some base classes were extended. Suppose you will be able to provide loaded assembly with all referenced assemblies from .NET 3.5. Therefore everything should be ok, but you can receive some exceptions related to type construction.

     

    Still, it's pretty unusual scenario, you'd better test it carefully.

     

    Monday, April 21, 2008 2:57 PM
  • Small update. Assembly written using .NET 3.5 will require references to assemblies from .net 2.0 sp1. Versions are different, therefore you will most likely receive "Assembly not found" exception.

     

    Monday, April 21, 2008 3:01 PM
  • If the target machine has .net 3.5 it also has .net 2.0 sp1. Can these go side by side with .net 2 no sp? IOW can .net 3.5 installation break my existing .net 2 no sp applications? will these applications now use .net 2.0 or 2.0 sp1 dll's on run time?
    If they will use sp1 than my dll will use it also so they are "in the same boat". but if they will use 2.0 no sp and my dll will use 2.0 sp1 - will this break always, never, or in some case (and which are they).

    Thanks,
    Yaron



    Monday, April 21, 2008 4:42 PM
  • You can't have both 2.0 and 2.0SP1 on the same machine.  Installing .NET 3.5 or .NET 2.0SP1 updates your 2.0 framework version to 2.0.50727.1433.  If the machine is updated to 2.0SP1 your .NET 2.0 applications will automatically use that version.

     

    There are very few breaking changes, one thing off the top of my head is that DEP protection is enabled by default for images the C# compiler generates as of SP1.  This can break some old ATL components.  I've written on this in my blog in the past.

    Monday, April 21, 2008 5:30 PM