T4MVCVB doesn't work on clean install?

0

I just installed T4MVCVB and it won't compile:

Error   1   Compiling transformation: Invalid token 'this' in class, struct, or interface member declaration    c:\...\T4MVCVB.tt   1   1
Error   2   Compiling transformation: Method must have a return type    c:\...\T4MVCVB.tt   1   6
Error   3   Compiling transformation: Type expected c:\...\T4MVCVB.tt   1   12

Note that the line number is 1 for each of these errors, so there's no way at all to see what line it doesn't like.

How can I figure out what the problem is so I can generate typed helpers for VB?

Edit: After some cleanup, now I get the following compiler error, and the line number of the problem:

Error   112 Running transformation: System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
at EnvDTE80.CodeFunction2.get_Attributes()
at  {long call stack}

The line it doesn't like is:

// Ignore methods that are marked as not being actions
if (GetAttribute(method.Attributes, "System.Web.Mvc.NonActionAttribute") != null)
    continue;
vb.net
t4mvc
asked on Stack Overflow Mar 24, 2014 by Joshua Frank • edited Mar 24, 2014 by Joshua Frank

1 Answer

1

Make sure you are using the latest version made for VB. Here is the T4MVCVB Nuget Package

If it's still breaking before generating the .vb files, I would uncomment these two lines near the top of T4MVCVB.tt and see if you can find the problem location.

//System.Diagnostics.Debugger.Launch();
//System.Diagnostics.Debugger.Break();
answered on Stack Overflow Mar 24, 2014 by Nick Prince • edited Mar 24, 2014 by Nick Prince

User contributions licensed under CC BY-SA 3.0