'ICompositionContainer' could not be found

Topics: Web Client Software Factory, User Forum
Feb 4, 2008 at 3:40 PM
I am new to the WCSF but would like to use in creating a web application.
Here are the details of my problem.

XP Pro + SP2

Dev environment:
VS2005 + SP1 (.NET 2.0 Framework)

Download & install (took all defaults):
Enterprise Library 3.1
Guidance Automation Extension
Guidance Automation Toolkit

There is no need to modify or create custom Guidance Packages or use PageFlow.
So I do not think I have to goto .NET 3.0/3.5 and VS2005 extensions for WWF.

It took me a long time to just get the Tools -> Guidance Package Manager to show up and then it was empty.

Eventually I managed to create a brand new solution for a Web Application Project but when I compile; I get the following error.

error CS0246: The type or namespace name 'ICompositionContainer' could not be found (are you missing a using directive or an assembly reference?)

What am I missing now??

Any ideas?
Feb 4, 2008 at 4:58 PM
I think you are missing a reference to Microsoft.Practices.CompositeWeb.dll in your sell module as the 'ICompositionContainer' interface is defined in Microsoft.Practices.CompositeWeb.Interfaces.

So I believe that after adding a reference in sell module and adding a using statement in ShellModuleInitializer.cs (of course if it is not there) "using Microsoft.Practices.CompositeWeb.Interfaces;" you should solve the issue.

Hope it helps,
Feb 4, 2008 at 5:05 PM
A friend sent the following to me which I tried and it actually ended up working.
The basic web application project I had WCSF create actually now compiles.
I now have to play around with it (adding modules and views/presenters) to see if I have any other problems.

Anyway here is the solution that fixed the Interface Not Found problem.
(had to adjust for directory difference)
Based on ...

Step By Step:

1. Open <SourceDir>\Microsoft Web Client Factory\Source Code\Blocks\CompositeWeb\CompositeWeb.sln

2. If you want to use Enterprise Library 3.1 dlls then copy all contents from <install-dir>\Microsoft Enterprise Library 3.1 - May 2007\Bin to <SourceDir>\Microsoft Web Client Factory\Source Code\Blocks\EnterpriseLibrary

3. Rebuild the solution.

4. <SourceDir>\Microsoft Web Client Factory\Source Code\Blocks\CompositeWeb\Source\CompositeWeb.EnterpriseLibrary\bin\Debug will contain all the compiled dlls. Copy All DLLs from this directory to your WCSF solution's Library folder. Override when asked.

5. Rebuild your WCSF solution.