MvcMailer icon indicating copy to clipboard operation
MvcMailer copied to clipboard

Errors when running Scaffold Mailer UserMailer Welcome

Open DEWaller opened this issue 13 years ago • 13 comments

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

DEWaller avatar Aug 13 '11 14:08 DEWaller

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

smsohan avatar Aug 13 '11 15:08 smsohan

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#.

DEWaller avatar Aug 13 '11 17:08 DEWaller

I have the same issue :(

NicoJuicy avatar Nov 25 '11 14:11 NicoJuicy

I have this problem in a fresh C# project.....

andrewknightley avatar Jan 24 '12 11:01 andrewknightley

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

andrewknightley avatar Jan 24 '12 11:01 andrewknightley

See possible fix here... https://github.com/smsohan/MvcMailer/issues/37

andrewknightley avatar Jan 24 '12 12:01 andrewknightley

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

kahanu avatar Feb 25 '12 02:02 kahanu

Same exact problem here.

Leftyx avatar Aug 31 '12 08:08 Leftyx

The same for me.. ):

germanf avatar Aug 31 '12 14:08 germanf

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

edwardt avatar Sep 06 '12 21:09 edwardt

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 ...

jamsoft avatar Nov 07 '12 02:11 jamsoft

same issue here.. Please help :(

BrilliantBrains avatar Dec 01 '14 07:12 BrilliantBrains

solved issue on stack overflow

Follow the below steps to solve the issue

  1. Un-install MvcMailer.
  2. Un-install MvcScaffolding and T4Scaffolding.
  3. Set the correct Default Project in Package Manager Console.
  4. Run this from command Install-Package MvcScaffolding -Version 1.0.8-vs2013 -Pre as mentioned by Scott himself here.
  5. Install MvcMailer through Nuget.
  6. Run this command Scaffold Mailer.Razor UserMailer Welcome,PasswordReset

BrilliantBrains avatar Dec 02 '14 13:12 BrilliantBrains