After installing CodeSmith 5.2.1, I found there’s an issue that Visual Studio 2010 cannot generate code by “Code Generation Item”, especially while generating Entity Framework entities. The error was “There was a problem getting an AppDomain to run the transformation from the host.”
After uninstall the CodeSmith, everything is OK.
Then I reinstall the CodeSmith and uncheck the “Visual Studio 2010 Integration”. The conflict is no more exists.
Hope it helps.