Microsoft has published a template for the Microsoft .NET Framework 4.0 and .NET Framework 4.0 Client Profile.
The template can be used with the Image Configuration Editor. It will add all required packages automatically to ensure that the framework works properly.

To download this template and also other templates for Microsoft and 3rd party applications visit the Microsoft Windows Embedded Standard 7 Compatible Applications website.