EntLib 5.0 & .Net FW 4.0

Topics: General discussion
Dec 12, 2009 at 7:43 AM

Hi there,

I am about to start a green fields development and would like to use .Net 4.0 and Enterprise Library 5.0. I have seen from the documentation that it specifically targets .Net 3.5 SP1 based one user feedback. Is there any guidance on running ti with .Net Framework 4.0.

Any pointers greatly appreciated.




Dec 14, 2009 at 10:56 AM


Which documentation are you referring to? I haven't seen any guidance yet with regards to using the ent lib 5.0 with .NET 4.0, all i see is just the Ent lib 5.0 developer notes which is available here http://entlib.codeplex.com/wikipage?title=EntLib5%20Developer%20Notes&referringTitle=Home

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.


Dec 14, 2009 at 6:52 PM

Hi Ben,

I just posted a stable build of Enterprise Library 5.0 (changeset 61455) on a new site called Composure. I have run all the tests against it and the vast majority succeed just fine. In some cases the tests themselves may need to be adjusted but I have left that as an exercise for guys like you!

Feel free to try it out and report your experiences. As far as I can tell the build works as expected and you can customize it using all the new features of the latest Framework. The only restriction is that your Applications must currently use Full Trust because of the changes in the security model for .NET 4.0. I'm sure the P&P team will be making changes to the permissions logic, but I did not want to muddy the code to that degree without further guidance from them on how they will be handling that aspect.


Dec 15, 2009 at 2:29 AM
Edited Dec 15, 2009 at 2:33 AM


Dec 15, 2009 at 2:39 AM

Hi Valiant,

I may not have made myself clear, I too have not found any guidance on EntLib 5.0 and .Net Framework 4.0. What I did find was this document http://blogs.msdn.com/agile/archive/2009/04/16/enterprise-library-5-0-product-backlog-prioritization-results.aspx that states that user preferences is to target the .Net 3.5 SP1 Framework and that test paths will be carried out on .Net Framework 4.0.

So I presumme that I just use the 3.5 SP1 Binaries in my 4.0 project?




Dec 15, 2009 at 2:43 AM

Hi Ben (bstabile),

Thanks for this! I will def take a look, do you intend on keeping this up to date as new changesets are released? Have you kicked off a discussion with the P&P team about the desired approach to the changes to the permission logic?




Dec 15, 2009 at 2:46 AM

There isn't any official guidance from the Entlib team yet, we'll see if there will be when Entlib 5 has been officially released.   There is a bug though in VS2010 (which uses .net 4.0) Beta 1 which causes entlib projects to not work in it. - http://entlib.codeplex.com/Thread/View.aspx?ThreadId=63326.  Since there's already the Beta 2, I supposed it's already fixed as Chris had mentioned.

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.

Dec 15, 2009 at 4:28 AM

We haven't bothered to deliver "guidance" about running entlib on .NET 4.0 pre-releases because it's a relatively short timeframe, they don't last long, change rapidly, and we'll be releasing Entlib 5 pretty close to the same time VS 2010 / .NET 4.0 ships anyway.

Our current plans for Entlib 5 is to ship one set of binaries that will work in both 3.5sp1 and 4.0 projects. We also hope to get the source into shape so that it will compile with VS2010. We'll be doing most of that work after the holidays.

There were bugs in .NET 4.0 beta 1 that caused Entlib (and a bunch of other stuff) to break, but they've been fixed (or should have been fixed) in beta 2.



Dec 15, 2009 at 9:29 AM

Hi All,

Thanks for your feedback. Given your planned direction I will continue to use the 3.5 SP1 binaries and keep fingers crossed that I don't hit any troubles before you guys do!