Composite Application Guidance for WPF with EntLib 4.1
Tuesday, November 18, 2008 – 5:16 PMI’ve been working on an application that uses Composite Application Guidance for WPF (Prism) and wanted to upgrade to use Enterprise Library 4.1 rather than the 4.0 version that Prism originally shipped against.
Turns out updating this is pretty straightforward (but not trivial)…
- Install Enterprise Library 4.1 – October 2008.
- Copy the new versions of the binaries from the EntLib install Bin folder into the appropriate Source\Lib\EntLib and \Source\Lib\Unity folders.
- Open the Source\CAL\CompositeApplicationLibrary.sln solution.
If you’re optimistic like me at this point you probably hit F5 in the hope everything would just work. Of course if that were the case then I wouldn’t be writing this blog post…
What you see is build errors. The more observant will notice that the IUnityContainer interface has changed causing lots of compile errors as the MockUnityContainer class doesn’t implement the interface fully.
Luckily a replacement class is already available as the Prism team are now developing version 2 against EntLib 4.1 so have already encountered this issue…
- Download the Prism V2 Source Code and install it.
- Copy the MockUnityContainer.cs file from the V2 CAL\Desktop\Composite.UnityExtensions.Tests\Mocks\ to Source\CAL\Composite.UnityExtensions.Tests\Mocks\ in the V1 install folder.
- Rebuild the solution and rerun all the unit tests.
Everything should pass. You now have a set of binaries for use against EntLib 4.1.
1 Trackback(s)
Sorry, comments for this entry are closed at this time.