Sorry, I probably did not express my points well. Let me start at some basics just to ensure that we are starting at the same point. There are 3 CLR versions, 1.x, 2.0, 4.0. Framework 3.0 and 3.5 are simply add on assemblies that target the 2.0 runtime. This fact is why the 3.5, 3.0 and 2.0 interop works so well. That is also why the service pack for 3.5 updates the 3.0 and 2.0 assemblies.
4.0 targeted runtime can call into 2.0 CLR code. The problem is that both the 4.0 and 2.0 CLR must be present on the system. This leads to a distribution package that may need to install both the 3.5 SP1 (the best way to get a 2.0 Framework installed) and the 4.0 frameworks. (I have one of those distributions right now.) Even once the 3.5 SP1 package that is "provided" by the SDK install is installed, there is still the ".NET Framework Family Update..." package that is only available via Windows/Microsoft Update. (This update fails on many older somewhat corrupted XP systems.) If a developer needs to release this update with their install package, they would have to build package files for 3 different hotfixes (one for 2.0, 3.0 and 3.5) and for, I think, 4 (maybe even more) different OS combinations. . The dual framework package is not much of issue for Windows 7 systems, because Win 7 and Server 2008 r2 come with a completely patched 3.5 framework. However, Windows XP, Vista, Server 2003 and 2008 do not come with a 3.5 framework and therefore it MAY need to be installed. We need/must have a 4.0 targeted assembly (someday soon - not today) so that applications that are built against 4.0 will only require 4.0 and not 3.5 and the rest of the 2.0 CLR. We must also have assemblies that target both the full and client frameworks of 4.0 and (I believe lessor priority) 3.5 (again a polling question). It is my contention that many of the users of log4Net have no idea about the inoperability of the CLRs and that 4.0 can consume 2.0 targeted code. I believe this because of the number of questions that start along the lines of, "I cannot find the 4.0 version of log4Net, how can I use it in xxxxx". Someone then explains to them that it will just work. Unfortunately, the response never says that they need both frameworks installed on the target system. The second set of traffic is that "log4Net does not log anything when I call it for code compiled for .NET Framework 4.0". When asked, the response has usually been that they were attempting to use an ADO appender. I know the rolling file, SMTP and console appenders all work correctly, but I have never tried an ADO appender on any version. I have just uncovered and am in the process of having Microsoft look at an issue in the 4.0 to 3.5 interop. In my application that uses both, the 4.0 code runs just fine, but when it is attempts to call the 3.5 code it gets an untrapped but ignored exception. This happens on a clean install of 3.5 SP1 and 4.0 on a clean XP system. The interesting thing is that a system restart resolves the issue and the application then runs. (Please note that the install sequence is 3.5 SP1 followed by 4.0 followed by a system restart followed by the application. Another restart must be done after the application is installed.) While this is not our problem, it does raise yet more obstacles to interoping a 2.0 targeted assembly with a 4.0 targeted application. >> And then we add conditional compilation on a CLIENT_PROFILE that removes all System.Web >> references and target 2.0 again but this time with the symbol set. Shouldn't the >> resulting assembly work for the 3.5 and 4.0 client profiles? Assuming that the reference to the missing assembly is dropped as you suggested, I will agree to the 3.5 client profile. (I am not saying that it is not dropped, I just do not have knowledge of that one way or the other.) An application targeting the 4.0 client profile will still require the install of the 3.5 client profile if we do not target 4.0 during the build of the assemblies. ---------------------------------------------------------------------- Roy Chastain -----Original Message----- From: Stefan Bodewig [mailto:bode...@apache.org] Sent: Monday, August 15, 2011 09:00 To: log4net-dev@logging.apache.org Subject: Re: Client Profiles On 2011-08-15, Roy Chastain wrote: >>> What I wonder is: do we really need 3.5 and 4.0 assemblies at all? > Two comments > 1) - There seems to be a lot of confusion among developers about the > Frameworks. By reading the questions that have been asked on the > list, I believe that many of them do not realize that a 4.0 framework > app can call 3.5 framework code. It is not necessarily our job to > educate them, but there has been a lot of traffic about 4.0 and even > numerous "bug reports" about failures. I do not believe I ever saw a > real description of the failure, but it seems that several of them > dealt with ADO appenders, so there could actually be a problem with them. In this case we should investigate this. It should stick out when triaging JIRAs. > 2) - We certainly need code that will compile against the 4.0 Framework. Against 2.0, no? > I currently have a product that requires 4.0 and 3.5 and the amount of > time to install it on an out of date XP system is absurd. We all > think XP should be gone, but the reality is that it is not. Same for > sever 2003. I'm sure I know what you are talking about. Stefan