Apr 15, 2011 at 10:33 PM
Edited Apr 15, 2011 at 11:18 PM
I worked through Steve's
first blog post on Scaffolding project back in January-February, and everything was working fine. I couldn't wait to learn how to tweak T4 templates. Well, by now I installed MVC3 tools update, so I decide to quickly get through the posts to the point where
I stopped. Unfortunately, I was disappointed.
I am getting an error (somebody reported the same error in Steve's Blog):
PM> Scaffold Controller Team
Invoke-Scaffolder : A positional parameter cannot be found that accepts argument 'Team'.
At line:1 char:9
+ Scaffold <<<< Controller Team
+ CategoryInfo : InvalidArgument: (:) [Invoke-Scaffolder], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,T4Scaffolding.Cmdlets.InvokeScaffolderCmdlet
Interesting, if I look at cmdlet's parameters, this error makes sense:
PM> Get-Help scaffold
Invoke-Scaffolder [-Scaffolder] <String> [-Project <String>] [-OverrideTemplateFolders <Object>]
[-BlockUi] [-PipeOutput] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>]
[-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>]
[-OutVariable <String>] [-OutBuffer <Int32>]
That is, there are no positional parameters except for the scaffolder itself (which is in our case "Controller").
So, now I am stuck...
Update: I tried the same on a different computer, and everything works. So, it's not just the updates in Scaffolding package and MVC3 tools. I also noticed that on the problematic system I get two versions of the package - 0.9.4 and 0.9.9.
Not sure why. On the other computer I see only 0.9.9. Any advice would be appreciated