Problems getting ETF to build

Jun 11, 2011 at 9:56 PM

I've just checked out the source and when I compile in VS2010 I get the following error:

Error 1 The type 'System.ComponentModel.Composition.ExportAttribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel.Composition, Version=2009.22.10.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'. c:\Windows\assembly\GAC_MSIL\EPiServer.Framework\\EPiServer.Framework.dll TemplateFoundation

I haven't altered the solution at all except to add a reference to PageTypeBuilder. What do I need to do to get it building?

Jun 12, 2011 at 4:42 PM

This is a conflict with the version of DLLs supplied with EPiServer, and those with .NET framework 4.

Make sure that you use the version of System.ComponentModel.Composition.dll, which is included in the EPiServer installation, and not the one installed with .NET 4. 
1. Unload the project in VS 2010 by right-clicking on the project and choose “Unload project”.
2. Right click on the project again and select “Edit project”.
3. Locate the line : <Reference Include=”System.ComponentModel.Composition” /> and change it to:
<Reference Include="System.ComponentModel.Composition" >
<HintPath><location of episerver bin> \System.ComponentModel.Composition.dll</HintPath>