Issues with VisualSVN and T4Toolbox

Dec 12, 2008 at 1: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\TransformationContext.tt:line 266
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.Template.RenderToFile(String fileName) in c:\Program Files\T4 Toolbox\T4Toolbox\Template.tt:line 80
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.ScaffoldingGenerator.GenerateDomainObjectAndTests() in c:\projects\Suvius\Flamingo\tools\CrudScaffolding\ScaffoldingGenerator.tt:line 106
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.ScaffoldingGenerator.RunCore() in c:\projects\Suvius\Flamingo\tools\CrudScaffolding\ScaffoldingGenerator.tt:line 42
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.Generator.Run() in c:\Program Files\T4 Toolbox\T4Toolbox\Generator.tt:line 68
   at Microsoft.VisualStudio.TextTemplating77FDAC4A39299DDBABC76D1B2340818A.GeneratedTextTransformation.TransformText() in c:\projects\Suvius\Flamingo\tools\CrudScaffolding\ScaffoldingGeneratorCommand.tt:line 24 C:\projects\Suvius\Flamingo\tools\CrudScaffolding\ScaffoldingGeneratorCommand.tt 1 1

This seems very similar to the issues with ActiveWriter and VisualSVN described here: http://groups.google.com/group/visualsvn/browse_thread/thread/ada83dc3f54e40e8

I've verified that uninstalling VisualSVN solved my problem but wouldn't mind keeping both it and T4.
Dec 19, 2008 at 2: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.
Coordinator
Dec 23, 2008 at 10: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?

Oleg
Dec 23, 2008 at 11:11 AM
Oleg,

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.

Thanks,
Kyle
Mar 2, 2009 at 2:09 PM
VisualSVN has put up a version that addresses the issue: http://groups.google.com/group/visualsvn/browse_thread/thread/61eb05494acaab01/93991204e4e65448?show_docid=93991204e4e65448

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