Using Smart Client Software Factory with Enterprise Library 4.1

This article describes the steps required to upgrade the Composite Application Block, the Offline Application Block, the Quickstarts, the Reference Implementation and the Guidance Package shipped with the Smart Client Software Factory - April 2008 to use the Enterprise Library 4.1.


Breaking Changes

  • Breaking changes in EntLib 3.1 to 4.0 in the Cache Manager from concrete type to Interface type
    • Bank Teller RI : Fails to compile in the Infrastructure module.
  • Breaking changes in SQLCE with VS2008
    • Offline Application Block: Fails to execute one of the unit test fails in the expected exception thrown from SQL Server CE

Steps to Use SCSF with EntLib 4.1

To use SCSF - April 2008 release with the EntLib 4.1 release, you should perform the steps provided in the article How To: Use SC-SF with Enterprise Library 4, and the considerations described in the Test results: SCSF on EntLib 4.1 ( section.

Test results: SCSF on EntLib 4.1 (

Action Modifications Results Comments
Composite Application Block build References to Ent Lib 4.1 DLLs added. Succeeded
Offline Application Block build References to Ent Lib 4.1 DLLs added. Succeeded
Composite Application Block tests Succeeded
Offline Application Block tests Failed The test case SmartClientDatabaseFixture.ExecuteSqlStringCommandWithNotEnoughParameterValues is failing with the following exception: "Test method Microsoft.Practices.SmartClient.EnterpriseLibrary.Tests.SmartClientDatabaseFixture.ExecuteSqlStringCommandWithNotEnoughParameterValues threw exception System.IndexOutOfRangeException, but exception System.Data.SqlServerCe.SqlCeException was expected. Exception message: System.IndexOutOfRangeException: An SqlCeParameter with ParameterName 'param2' is not contained by this SqlCeParameterCollection."
Click Once Succeeded Did not execute as it does not have any dependency with EntLib.
Quick starts References to Ent Lib 4.1 DLLs added. Succeeded
Reference Implementation References to Ent Lib 4.1 DLLs added. Failed The Infrastructure.Module project fails to compile. Exception message: "Cannot implicitly convert type 'Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager' to 'Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager'. An explicit conversion exists (are you missing a cast?)"
Guidance Package build Succeeded
Guidance Package tests Succeeded

Last edited Oct 28, 2008 at 5:10 PM by ibaumann, version 1


Lois Nov 7, 2008 at 5:05 PM 
1 more thing to add:

In <b>CommonArguments.xml</b> (Recipe/Common) at <b>Argument Name="SmartClientBlocksDlls"</b> and <b>Argument Name="EnterpriseLibraryDlls"</b> , you should replace the "old" assembly <b>Microsoft.Practices.SmartClient.EnterpriseLibrary.Data.SqlCe.dll</b> in the first Argument Name with <b>Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.dll</b> and add the same assembly name in the second Argument Name, just if you did the change in the Offline solution.

Greetings :D