clariuslabs / TransformOnBuild

Transform Text Templates On Build
Apache License 2.0
48 stars 17 forks source link

Add support for T4VSHost #35

Open mnaoumov opened 8 years ago

mnaoumov commented 8 years ago

As a maintainer of NuGet package https://www.nuget.org/packages/Clarius.TransformOnBuild-unofficial/ I received the following letter from one user

I ran into this error: A processor named 'T4VSHost' could not be found for the directive named 'CleanupBehavior'

I'm trying to 'reverse engineer' the code first db... EF6.Utility.CS.ttinclude has some cool helpers that I'd rather not live without.

The solution, according to this post: http://romiller.com/2013/03/21/processor-named-t4vshost-could-not-be-found-for-the-directive-named-cleanupbehavior/

Is to add this to the build command: -dp T4VSHost!Microsoft.Data.Entity.Design.VisualStudio.Directives.FallbackT4VSHostProcessor!"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Microsoft.Data.Entity.Design.dll"

I do this manually at the moment but love the way you went about 'fixing' the transform on build and think the rest of the community could benefit from this.

Thanks for your awesome efforts!