MvcMailer
MvcMailer copied to clipboard
Errors when running Scaffold Mailer UserMailer Welcome
Find-ScaffolderTemplate : Could not find template 'cs\IMailerTemplate.vb.t4' below folders ['E:....\packages\MvcMailer.1.1\tools'] At E:....\packages\MvcMailer.1.1\tools\MailerFunctions.ps1:19 char:41
-
$templateFile = Find-ScaffolderTemplate <<<< cs\$MailerTemplate -TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage -ErrorIfNotFound
- CategoryInfo : NotSpecified: (:) [Find-ScaffolderTemplate], Exception
- FullyQualifiedErrorId : T4Scaffolding.Cmdlets.FindScaffolderTemplateCmdlet
Can you try running it on a fresh project? I have seen this happening when nuget has already done some installing/uninstalling on a project, at times it leaves things on an inconsistent state.
Sent from my iPhone
S M Sohan Consultant ThoughtWorks Canada Suite 1100, 600 6th Ave SW Calgary, AB T2P 0S5 Cell: +1 403 714 2673
On 2011-08-13, at 8:58 AM, vegplot [email protected] wrote:
Find-ScaffolderTemplate : Could not find template 'cs\IMailerTemplate.vb.t4' below folders ['E:....\packages\MvcMailer.1.1\tools'] At E:....\packages\MvcMailer.1.1\tools\MailerFunctions.ps1:19 char:41
$templateFile = Find-ScaffolderTemplate <<<< cs\$MailerTemplate -TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage -ErrorIfNotFound
- CategoryInfo : NotSpecified: (:) [Find-ScaffolderTemplate], Exception
- FullyQualifiedErrorId : T4Scaffolding.Cmdlets.FindScaffolderTemplateCmdlet
Reply to this email directly or view it on GitHub: https://github.com/smsohan/MvcMailer/issues/24
I created a new project, installed MvcMailer using package Manager Console but still get the same errors. I then tried with a C# and that was fine so I can only conclude it's related to the project being based on VB rather than C#.
I have the same issue :(
I have this problem in a fresh C# project.....
In fact my error is this....
PM> Scaffold Mailer UserMailer Welcome,PasswordReset Invoke-Scaffolder : A positional parameter cannot be found that accepts argument 'UserMailer'. At line:1 char:9
- Scaffold <<<< Mailer UserMailer Welcome,PasswordReset
- CategoryInfo : InvalidArgument: (:) [Invoke-Scaffolder], ParameterBindingException
- FullyQualifiedErrorId : PositionalParameterNotFound,T4Scaffolding.Cmdlets.InvokeScaffolderCmdlet
See possible fix here... https://github.com/smsohan/MvcMailer/issues/37
The possible fix didn't work for me. I'm getting lots of error messages when I install via the PackageManager Console.
The "out-of-date versions" for MvcScaffold and T4Scaffold as mentioned in the other article, were installed by MvcMailer. MvcMailer was the only NuGet package in my project. So if they are out of date then references to the latest versions need to be made in MvcMailer, don't they?
I've used this successfully on my older 32-bit machine, but I haven't used it in about a year. Any suggestions?
I'm on a brand new Dell laptop, Windows 7 Ultimate, VS 2010 SP1.
Here's my output:
PM> install-package mvcmailer Attempting to resolve dependency 'T4Scaffolding (= 0.9.7)'. Attempting to resolve dependency 'EntityFramework (= 4.1.10311.0)'. You are downloading EntityFramework from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkId=224682. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. Successfully installed 'EntityFramework 4.1.10715.0'. Successfully installed 'T4Scaffolding 0.9.9'. Successfully installed 'MvcMailer 1.1'. Successfully added 'EntityFramework 4.1.10715.0' to Vitafilm.Mvc. Successfully added 'T4Scaffolding 0.9.9' to Vitafilm.Mvc. Set-DefaultScaffolder : Unable to cast object of type 'NuGet.SemanticVersion' to type 'System.Version'. At C:\WebProjects\Vitafilm\packages\T4Scaffolding.0.9.9\tools\install.ps1:22 char:22
- Set-DefaultScaffolder <<<< -Name DbContext -Scaffolder T4Scaffolding.EFDbContext -SolutionWide -DoNotOverwriteExistingSetting
- CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], InvalidCastException
- FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet
Set-DefaultScaffolder : Unable to cast object of type 'NuGet.SemanticVersion' to type 'System.Version'. At C:\WebProjects\Vitafilm\packages\T4Scaffolding.0.9.9\tools\install.ps1:23 char:22
- Set-DefaultScaffolder <<<< -Name Repository -Scaffolder T4Scaffolding.EFRepository -SolutionWide -DoNotOverwriteExistingSetting
- CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], InvalidCastException
- FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet
Set-DefaultScaffolder : Unable to cast object of type 'NuGet.SemanticVersion' to type 'System.Version'. At C:\WebProjects\Vitafilm\packages\T4Scaffolding.0.9.9\tools\install.ps1:24 char:22
- Set-DefaultScaffolder <<<< -Name CustomTemplate -Scaffolder T4Scaffolding.CustomTemplate -SolutionWide -DoNotOverwriteExistingSetting
- CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], InvalidCastException
- FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet
Set-DefaultScaffolder : Unable to cast object of type 'NuGet.SemanticVersion' to type 'System.Version'. At C:\WebProjects\Vitafilm\packages\T4Scaffolding.0.9.9\tools\install.ps1:25 char:22
- Set-DefaultScaffolder <<<< -Name CustomScaffolder -Scaffolder T4Scaffolding.CustomScaffolder -SolutionWide -DoNotOverwriteExistingSetting
- CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], InvalidCastException
- FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet
Successfully added 'MvcMailer 1.1' to Vitafilm.Mvc. Set-DefaultScaffolder : Unable to cast object of type 'NuGet.SemanticVersion' to type 'System.Version'. At C:\WebProjects\Vitafilm\packages\MvcMailer.1.1\tools\install.ps1:23 char:22
- Set-DefaultScaffolder <<<< -Name Mailer -Scaffolder $mailerScaffolder -SolutionWide -DoNotOverwriteExistingSetting
- CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], InvalidCastException
- FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet
Same exact problem here.
The same for me.. ):
Update to the latest T4Scaffolding and that works. I need ot do Uninstall-Package to clean up all the old install include MvcMailer. Then install the latest T4Scaffolding beforehand then install MVCMailer again
Yup, I've just run into this as well. I'm not a NuGet fan either, it seems to have messed up the .NET versioning world ...
same issue here.. Please help :(
solved issue on stack overflow
Follow the below steps to solve the issue
- Un-install MvcMailer.
- Un-install MvcScaffolding and T4Scaffolding.
- Set the correct Default Project in Package Manager Console.
- Run this from command Install-Package MvcScaffolding -Version 1.0.8-vs2013 -Pre as mentioned by Scott himself here.
- Install MvcMailer through Nuget.
- Run this command Scaffold Mailer.Razor UserMailer Welcome,PasswordReset