Enterprise Library Update


December is here, and I know that a lot of you are getting anxious for an update on Enterprise Library for .NET Framework 2.0. So here’s the latest:


We are now code complete on all blocks (with the exception of Cryptography), including all of the designtime and config tool. We still have a bit of testing to do, and bugs are trickling in – but they are all being fixed quickly and we are very happy with the stability of the library. So much so that we have just published the December “interim community drop” of the latest code to the community. This code is very high quality, but we haven’t gone through all of the packaging and polish that went with the CTP (sorry, I know a full CTP would be better, but it would take more time and we’re putting all our effort on the final release). The runtime code is 99% the same as what we shipped in the November CTP (we did fix a few bugs) but we’ve added the designtime and tooling support. The new designtime code does depend on a few minor fixes to the runtime, so you won’t be able to use it with the November CTP runtime code – but the configuration files generated with the tool should generally work OK with the CTP build.


The only significant outstanding task before we release is finalizing the Cryptography Application Block. The good news is that we now have a firm direction on what changes need to be made – this will be limited to some strengthening of our key management strategy for the symmetric algorithm and keyed hash providers. We are working on these changes now and we now expect to include this block in the final release of Enterprise Library for .NET Framework 2.0. The bad news is that this will require us to slightly slip the release date – we are now estimating mid January 2006. We apologize for this late change in schedule, but we do hope that having a full release including the Cryptography Application Block is worth waiting a few extra weeks for.


Thanks again for all of your support – enjoy the new build and keep the feedback coming in!


This posting is provided “AS IS” with no warranties, and confers no rights.

Comments (37)
  1. Bryan says:

    Does this require Team Suite to build? VS2k5 Pro complains about invalid project types.

    -Bryan

  2. Bill Gerold says:

    Where would I find he Configuration Tool?

    ANy Help would be appreciated

  3. tomholl says:

    Bryan – there is an EnterpriseLibrary.VSTS.sln and an EnterpriseLibrary.NUnit.sln. The former requires VSTS, but the latter will work with any build (and you don’t actually need NUnit unless you want to run the tests).

    Bill – the configuration tool lives in srcConfigurationConsole.

    Tom

  4. Chris Kinsman says:

    Woo hoo! Just downloaded it and will be giving it a go. Configuration for the masses…

  5. Walter Sassano says:

    Is it safe to assume that this interim release is based on the production release of the 2.0 framework?

  6. tomholl says:

    Chris – thanks – I know you were crying out for the tool. Let me know what you think.

    Walter – yes, very, very safe assumption 🙂

  7. Bryan says:

    Thanks Tom. Not use NUnit? I don’t thinl I could get my pants on right without it 🙂

    Can’t wait to give this a go.

    Cheers,

    Bryan

  8. Jason says:

    I just built it and can’t wait to give it a go, but would it be possible to get whatever the latest documentation is? I’m trying to make use of the ObjectBuilder and want to make sure I am making correct use of the different features and generics for DI.

    Also, entlib 2.0 is actually fun to work with and the configuration is pretty simple. Definitely a big step from 1.0. Thanks for all the hard work.

    -jason

  9. soni says:

    Thanks Tom

    Keep the good work

  10. John says:

    Some how the configuration tools. remove this lines if existed already in web.config. This cause problems. Since it do need LocalSqlServer. (Anyway, it is excellent library)

    <connectionStrings>

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient"/>

    </connectionStrings>

  11. El Bruno says:

    Great Work again !!!

    I found very cool the new projects organization (some new unit test projects), and the new Instrumentacion component … mmmm another great idea !!!

    Bye from Spain

  12. tomholl says:

    Jason: the November CTP is still the best source of the docs. We are working on filling in the gaps, but unfortunately we haven’t got anything about detailed about the Object Builder strategies at this time. If you have specific questions, post them to GotDotNet and we’ll try to answer them.

    John: Yes, there are a few interesting implications to using System.Configuration for Enterprise Library. While the <add>/<remove>/<clear> semantics are understood by the blocks at runtime, the tool won’t recognize all of these and may delete things if you use anything but <add>. Also all configuration in machine.config is merged together both at runtime and designtime, so you’ll see the LocalSqlServer in every application you use, but you won’t be able to edit or delete that value using the tool. If you really don’t want it there, you can modify your machine.config file.

    Tom

  13. giovanni says:

    what about azman provider in Security Application Block?

    gio

  14. sd says:

    I implemented the November CTP in a 2.0 Framework web application. We had previously utilized the June Edition of the 1.1 DAAB. Though there was some code modifications needed, everything seems to function quite well and as expected. For the interm source, would it be better to build, then use the configuration tool, or should/can I just use my exisiting web.config? I would suspect that I would be able to just use my exisiting, but want to make sure before I run the Configuration tool on my exisiting configuration file.

  15. Mark says:

    Will a rolling flat file logging sink be provided or will we have to create a custom sink

  16. tomholl says:

    Giovanni – The AzMan provider is included in the Security.*.sln files. We didn’t include it in the main EntLib.*.sln files as it depends on the AzMan DLLs which won’t exist on XP machines by default (and we didn’t want build failures). I believe the designtime node for the AzMan provider is broken in the December build, so you’ll need to configure it by hand for now.

    SD: You should be fine to continue using your November config file with the December release. The only breaking config change that I’m aware of is that we renamed some properties on the Logging Exceptoin Handler’s configuration class.

    Mark: Alas no – we wanted to do this but we ran out of time. Hopefully Hisham Baz will update his for EntLib 2.0 (if we ask him very nicely 🙂

  17. Brad says:

    Tom, thanks for you and your team’s work. It saved my team loads of time ever since the days of SqlHelper. And now for my question… I can’t seem to locate the config tool. I know you said that it is in the srcConfigurationConsole directory but I don’t have any .exe files there. Do I need to compile that console project? If so, when I open that project, it complains about the references and setting them all by had is pretty tedious. Any ideas?

    I’m sure i’m just missing something obvious but can you or one of the blog readers point me in the right direction? Thanks in advance!

  18. tomholl says:

    Hi Brad –

    Thanks for the post – glad our stuff has helped you over the years!

    You do need to compile the configuration console yourself. However if you open one of the two EnterpriseLibrary.*.sln files (depending on which version of Visual Studio you have) and choose Build All, everything should build and the references should all be fine. If you’ve tried this and you are still getting errors, please send me a mail with more information and we’ll try to help you out.

    thanks

    Tom

  19. Mo Inam says:

    Hi,

    Has anyone tried to open this solution with Visual C# Express Edition?

    Is this possible? Or, do I have to have VS2005?

    Have a nice day y’all

  20. Brad says:

    Doh! Ok, I figured out the problem (PEBKAC issue). I was looking all over for EnterpriseLibrary.sln (which wasn’t there) and I thought that the EnterpriseLibrary.NUnit.sln solution contained strictly unit tests. It didn’t occur to me that the *.NUnit.sln had all the projects in one handy place. I opened it up, built everything, and now we have the coveted config tool! Life is good.

  21. jkgreer says:

    hmmm. AWESOME WORK.

    i only have one major issue. strong typing the project. have you guys thought of making a distro of a key and a quick way to compile in? i can make my own but i do feel bad :).

    o yeah and guids. there has to be away to represent a generic unique identifer and i could get off the sqldatabase class, arggg.

  22. Rammi says:

    Mo Inam: Yes, I’ve tried, it complains about sollution files, and also it’s not able to open the test projects, but on the end of war with msgboxes, I’ve been able to successfully build the library including the configuration tool.

    You just have to open the sln file.

  23. Pablo Almaguer says:

    Hi Guys I’m working building several Modules that Uses 4 Enterprise Library blocks.Is a really neat tool But…Yes there is alway a BUT.Anynone knows If is possible to install the Enterprise Library for .net 2.0 in Shared Servers.I really need to figure this our

    Any Tips of Suggestion with this problem??

  24. Keith Misegades says:

    Tom, We are using the blocks in signed applications and I spent the better part of yerterday making the appropriate changes to the source to use our snk file. I was successful in building all of the non-test projects with our snk file so that our application would build. Is it possible that the next shipped version would include an installation option to use a user defined strong name key file?

    Thanks, Keith

  25. tomholl says:

    Hi Keith –

    I’ve been playing with the strong-naming myself in the last few days, and I understand how painful it is. While I don’t think we’ll be able to automate this process in the installer, I am working on some Visual Studio macros to help with this process – I intend to share this with the community when it’s ready.

    In the meantime, here are some steps you can follow to strong-name everything, including the test projects:

    1. Open a VS command prompt and change directory to the place where you want to create your keyfile

    2. Use sn –k keyfile.snk to create a key pair (or reuse an existing keypair that is used in your organization)

    3. Use sn –p keyfile.snk publickey.pk to extract the public key from the keypair

    4. Use sn –tp publickey.pk to display the public key in hex form. Keep the console window open as you’ll need this info later

    5. Open the EnterpriseLibrary.VSTS.sln or EnterpriseLibrary.NUnit.sln solution (depending on which edition of VS is installed)

    6. For each project (including unit tests and design projects):

    a) Double-click on the Properties folder from the Solution Explorer

    b) Go to the “Signing” tab in the properties window, and click the “Sign the assembly” checkbox. Then choose “Browse…” in the dropdown box. Browse to the .snk keypair created earlier

    c) Close the properties window and save changes

    7. In Visual Studio, choose Edit > Find and Replace > Find in Files

    8. Search for InternalsVisibleTo aross the complete solution

    9. For each occurrence of the InternalsVisibleTo attribute:

    a) Copy the full public key (not the token) from the console window that was created with sn –tp.

    b) add the public key to the attribute, for example:

    [assembly: InternalsVisibleTo("Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008B3B735C2738A3A3518083C40A3AF8518DBA6D299F0DB7883A9BE2BFF1343B72A65A04EE8DEACF3A2A5B240126C1E803D14FEEDAC508DE566251756E0EAD6323D1C2B121B24904FEE55086CF1ACBD1146194603421DC0E13D9DC486422180ED756CCDADF31C0B7E4F58FAC82C867F26D8D886A45FF503D7B62BCB24A160C64F8")]

    10. Save each file you changed

    11. Rebuild the entire solution.

  26. John Yung says:

    Can you overload the ShouldLog() method to accept string as Category (ex: Logger.ShouldLog("Info")). This way, I don’t need to create a new LogEntry object.

    Thanks,

    John Yung

  27. tomholl says:

    Hi John –

    You can do this, but since each filter may use a different criteria to determine whether to log, you need to ask the filter directly. Assuming you have a category filter defined, you can do this:

    Logger.GetFilter<CategoryFilter>().ShouldLog("Info")

  28. Eric says:

    How do we get this to work in a rolling flat-file scenario? It is not realistic to have a single file that can grow unchecked, especially when deployed into a production environment. I have been playing with the Logging portion of the Enterprise Library, and do not see this functionality. Is it in there? If not, how can I get the Logging to function in this fashion?

  29. Greg says:

    We are trying to move from old EntLib and I’ve got an issue with DAAB method

    Database dbSvc = DatabaseFactory.CreateDatabase(string name)

    It complains that db name is not found in the configuration. DatabaseFactory.cs file has a reference to ConnectionSettings.config that supposed to keep service settings. What is the structure on the config file?

    Thanks,

    Greg

  30. Riley Taylor says:

    Tom,

    Just installed Dec 2005 bits after returning from the P&P Summit. Being new to the library, can you point me to some resources on how to use the Configuration tool? I see some tutorials targetting the 1.0 release, but none for 2.0.

    Thanks

  31. Bill Pierce says:

    Mr. Hollander,

    I realize this is a little late and EL 2.0 is practically out the door but I wanted to post this comment.

    I have been working with the ExceptionHandling + Logging libraries. I noticed that the ExceptionFormatter provides special handling for several properties on System.Exception but leaves out handlig for Exception.Data. The current WriteReflectionInfo on ExceptionFormatter writes ‘Data : System.Collections.ListDictionaryInternal’ for the Data property. I think it would be much more useful if Data was specially handled and interated through the List writing Key: Value pairs. I realize I could do this myself, but I think other users would find this base functionality useful.

    Thanks to you and your team for a wonderful toolset.

    -Bill

  32. At my current client we are using Enterprise Library.&amp;nbsp; We’ve used the previous two releases of the…

  33. 如果你自己的项目用到了基于.net2.0的 Enterprise Library – January 2006,并且你的项目是需要强签名的。这时候你就需要对企业库的代码作少量的修改,让企业库涉及到的项目组件也支持强签名。

  34. cnming says:

    修改企业库,让它支持强签名,除了需要把每个项目指定签名文件外,还需要修改每个项目配置的友元程序集(Friend Assemblies)。即如果AssemblyA中声明AssemblyB是它的Friend Assemblies,则AssemblyB可以像访问自身一样访问AssemblyA的internal类型和internal成员。上述设置AssemblyA 是不可以访问AssemblyB的internal类型。

  35. Ian says:

    1、打开VS2005的Visual Studio 2005 Command Prompt。 2、使用sn.exe 工具,生成一个 snk 文件 [sn -k keyfile.snk] 3、提取公钥到一个文件

  36. Interim Community Drop for MS Ent. Lib for .NET 2.0 Released…

Comments are closed.