This project is read-only.

Issues with VisualSVN and T4Toolbox

Dec 12, 2008 at 2:55 PM
I'm getting an error when using this with VisualSVN. The error message when I try to run a template is:

Error 1 Running transformation: System.EntryPointNotFoundException: Entry point was not found.
   at VisualSVN.VS.Interop.NativeExtenderCallback.OnQueryEditFiles(UInt32 rgfQueryEdit, String[] rgpszMkDocuments, UInt32* pfEditVerdict, UInt32* prgfMoreInfo, Boolean* skipOriginal)
   at VisualSVN.VS.Interop.NativeExtender.OnQueryEditFiles(NativeExtender* , UInt32 rgfQueryEdit, Int32 cFiles, UInt16** rgpszMkDocuments, UInt32* rgrgf, __MIDL___MIDL_itf_ivsqueryeditquerysave2_0000_0001* rgFileInfo, UInt32* pfEditVerdict, UInt32* prgfMoreInfo, Boolean* skipOriginal)
   at EnvDTE.ProjectItems.AddFromFile(String FileName)
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.TransformationContext.SaveOutputToFile(String fileName, String content) in c:\Program Files\T4 Toolbox\T4Toolbox\ 266
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.Template.RenderToFile(String fileName) in c:\Program Files\T4 Toolbox\T4Toolbox\ 80
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.ScaffoldingGenerator.GenerateDomainObjectAndTests() in c:\projects\Suvius\Flamingo\tools\CrudScaffolding\ 106
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.ScaffoldingGenerator.RunCore() in c:\projects\Suvius\Flamingo\tools\CrudScaffolding\ 42
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.Generator.Run() in c:\Program Files\T4 Toolbox\T4Toolbox\ 68
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.TransformText() in c:\projects\Suvius\Flamingo\tools\CrudScaffolding\ 24 C:\projects\Suvius\Flamingo\tools\CrudScaffolding\ 1 1

This seems very similar to the issues with ActiveWriter and VisualSVN described here:

I've verified that uninstalling VisualSVN solved my problem but wouldn't mind keeping both it and T4.
Dec 19, 2008 at 3:17 PM
I've managed to narrow this down further. The error occurs when I call RenderToFile on a Template. It is somewhere in the FindProjectItem call in TransformationContext, I believe.
Dec 23, 2008 at 11:37 AM
Thanks for posting this. I followed the ActiveWriter thread and don't understand how their patch can work. How can the EnvDTE code executing on the thread pool in a temporary appdomain be marshalled to the default appdomain? The EnvDTE code doesn't have this problem with Visual SourceSafe and Team Foundation Server source control providers. Did you try the workaround with VisualSVN?

Dec 23, 2008 at 12:11 PM

I couldn't tell where to put the workaround from the patch. It seems to pass the actual code generation itself to another thread but from what I can tell, the code generation from T4 Toolbox is simply leveraging the built-in Visual Studio capabilities. I've read their response a few times myself and don't know what they mean by marshalling to the default app domain.

I've posted on the VisualSVN group with no response. Will contact their support later today.

Mar 2, 2009 at 3:09 PM
VisualSVN has put up a version that addresses the issue:

It's not an official release yet but my early testing seems to indicate the problem is fixed.