precompiled template passing parameters on x64 machine

Jun 29, 2011 at 12:44 PM


I have a dll that I'd like to generate some precompiled template passing parameters to my Template at runtime and want to execute those tTemplates who returns code partials on my web application. It works fine when I used on Windows 7 32bit with VS 2010 and toolbox t4 installed. But I want to deploy my Web application to a windows server 64-bit and i receive this error when i attempt to execute my aspx page:

System.BadImageFormatException: Could not load file or assembly 'T4Toolbox.10.0' and its dependencies. An attempt was made to load a program with an incorrect format.

I'm not sure but... is the T4Toolbox.10.0.dll native x86? maybe that's the problem? There's any solution?

Thanks in advance


Jun 29, 2011 at 3:04 PM

Yes, T4Toolbox.10.0.dll is an x86 dll. and no, You cannot use it in your web site. It can only be used in Visual Studio. You will need a plain, not a T4 Toolbox preprocessed template for use in other applications.

Jun 30, 2011 at 8:14 AM

Thanks Oleg!

I was confused. I've solved using a plain preprocessed template.

thanks again,