EntLib 4.1 on VS2008 while targeting .NET 2.0?

Topics: Enterprise Library Core, Exception Handling Application Block, Logging Application Block
May 14, 2009 at 9:00 PM

I want to download an install Enterprise Library, but am unsure which is the proper version to download.

I'm running Visual Studio 2008 (.NET 3.5), but have a web app that I'm writing that is targeting .NET Framework 2.0. Will the latest version of EntLib (4.1) work in this scenario? I will be writing a mixture of apps that will target 2.0 and 3.5. What is the best approach as far as installing EntLib?

I'm primarily interested in the Exception Handling app block and the Logging app block.

Thank you!

 

May 15, 2009 at 7:50 AM

Hi,

Is there any specific functionality that you will use on EHAB and LAB? I've tried it in a simple app(VS 2008 and Ent Lib 4.1). I created a simple console app, targeting Framework 2.0,  when I add the Ent Lib 4.1 assemblies, i got a warning that says that the required .NET version required is greater than the version that is specified in the project. I just ignored it and continue adding it. I just used the EHAB to handle exception and log it. Also tried logging using LAB. They seem to be working fine.

Valiant Dudan
Global Technology & Solutions
Avanade, Inc.

entlib.support@avanade.com

May 15, 2009 at 11:19 PM

I'm simply interested in the most basic exception hnndling and basic logging to a database (or other storage).

Here's more details on the environment. The company I'm developing this app for uses VS 2008 on which I will be developing. However, their web server only has .NET 2.0 on it. They plan to upgrade it to 3.5 but not right away (there are other reasons why they can't upgrade right away).

So, I imagine that if I download the latest EntLib (4.1) and use it successfully on my development PC, it probably won't work on the production web server, right?

If I use a version of EntLib that is .NET 2.0 compatible and deploy to the .NET 2.0 web server, what would be involved in upgrading my app (if anything) when they upgrade the server to .NET 3.5?

--GG

May 21, 2009 at 4:49 AM

Hi,

Answering your last question, I think you would just fine if you will have a server which has .NET 3.5 and your app with .NET 2.0, since .NET 3.5 sits on top of the .NET 2.0, I think it will work just fine. I think in that case you can now upgrade your app to use .NET 3.5 specific features(like WCF).

Valiant Dudan
Global Technology & Solutions
Avanade, Inc.

entlib.support@avanade.com