Error when creating a new view using MvcScaffoldingT4TwitterBootstrapMvc Nuget package

146 views Asked by At

I installed the MvcScaffolding4TwitterBootstrapMvc package which is based on the scaffolding stuff Steve Sanderson has done. Now I'm attempting to create a new view based on it and I'm just receiving PS errors.

I'm typing this:

Scaffold View LocationType CreateOrEdit -Template _CreateOrEdit

(I've tried other view templates as well)

I receive this error message:

t4(115,64) : error CS1061: Compiling transformation: 'EnvDTE.CodeProperty' does not contain a definition for 'IsScaffoldable' and no extension method 'IsScaffoldable' accepting a first argument of type 'EnvDTE.CodeProperty' could be found

At packages\MvcScaffolding4TwitterBootstrapMvc.1.0.2\tools\RazorView\MvcScaffolding.RazorView.ps1:42 char:27

Obviously the template is causing the error because it can't find something (maybe the T4 library)? But I'm not really sure what or where I'd fix it.

1

There are 1 answers

0
Paul Mrozowski On BEST ANSWER

It looks like the IsScaffoldable extension method doesn't exist in the version of the T4Scaffolding.DLL that is installed with the NuGet package.

If found this work item which lead me to GitHub and I see this method exists. Since I'm not really using this attribute, I decided it's probably just simpler for me to remove the .IsScaffoldable() call from the T4 template instead of pulling down the source and compiling a new version of T4Scaffolding.