I am passing values to first two parameters of T4Scaffolding.Scaffolder. But it does not work what I excepted.
This is the powershell script file. Lets give it a name as Test.ps1
[T4Scaffolding.Scaffolder(Description = "Enter a description of Service here")][CmdletBinding()]
param(
[string]$ClassName,
[string]$Project,
[string]$CodeLanguage,
[string[]]$TemplateFolders,
[switch]$Force = $false
)
Write-Host "Class name is " $ClassName
Write-host "Project name is" $Project
Then I run it on package manager console as following
PM> Scaffold Test Member ConsoleApplication1.Domain
It prints me ClassName correctly but the project name is the one that is selected on nuget package manager console not the one that I give.
Class name is Member
Project name is ConsoleApplication1.Scaffolder
But the excepted result is
Class name is Member
Project name is ConsoleApplication1.Domain
Now the problem is how to pass ClassName and Project as parameter ? It just takes ClassName as the parameter but ignoring second one.
EDITED
Also tried this one but it did not work either.
Scaffold Service -ClassName Member -Project ConsoleApplication1.Domain