just tried to get the basic basics up and running and getting some fancy error conditions - most probably some basic steps are screwed up but I don't see the point - so some hints are highly appreciated.
So whats the setup?
- VS2010
- MVC3 or MVC4 Project - no strings attached, just the templates
- Create a really simple Model-Class Team like shown on http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/
What happens?
Try (after installing MvcScaffolding through NuGet Console) to call:
Scaffold Controller Team
And get the following error:
PM> Scaffold Controller Team
Scaffolding TeamsController...
Invoke-Scaffolder : The term 'Get-ProjectType' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At O:\Code\Resource\packages\MvcScaffolding.1.0.7\tools\Controller\MvcScaffolding.Controller.ps1:66 char:40
+ $dbContextScaffolderResult = Scaffold <<<< DbContext -ModelType $foundModelType.FullName -DbContextType $DbContextType -Area $Area -Project $Project -CodeLang
uage $CodeLanguage -BlockUi
+ CategoryInfo : NotSpecified: (:) [Invoke-Scaffolder], CommandNotFoundException
+ FullyQualifiedErrorId : T4Scaffolding.Cmdlets.InvokeScaffolderCmdlet
Fancy thing: of course Get-ProjectType itself seems to work (see below), so I'm kind of stuck right now - as this looks like a powershell issue somehow but the cmdlet itself works at least if called directly but not when inside the script? Any hints would be greatly appreciated!
Thanks a lot.
PM> Get-ProjectType
cmdlet Get-ProjectType at command pipeline position 1
Supply values for the following parameters:
Type: Team
DTE : System.__ComObject
Collection : System.__ComObject
Name : Team
FullName : Resource.Models.Team
ProjectItem : System.__ComObject
Kind : 1
IsCodeType : True
InfoLocation : 1
Children : System.__ComObject
Language : {B5E9BD34-6D3E-4B5D-925E-8A43B79820B4}
StartPoint : System.__ComObject
EndPoint : System.__ComObject
ExtenderNames :
ExtenderCATID :
Parent : System.__ComObject
Namespace : System.__ComObject
Bases : System.__ComObject
Members : System.__ComObject
Access : 1
Attributes : System.__ComObject
DocComment : <doc>
</doc>
Comment :
DerivedTypes :
ImplementedInterfaces : System.__ComObject
IsAbstract : False
ClassKind : 1
PartialClasses : System.__ComObject
DataTypeKind : 1
Parts : System.__ComObject
InheritanceKind : 0
IsGeneric : False
IsShared : False
PM>
With Kind Regards, Ives