smsohan / MvcMailer

A Mailer for ASP.Net MVC that forms the Email Body using MVC Views (Razor etc.) following Ruby on Rails ActionMailer style
MIT License
585 stars 176 forks source link

Scaffold does not work in VS2013 Preview #111

Open alvipeo opened 10 years ago

alvipeo commented 10 years ago

The command: Scaffold Mailer.Razor UserMailer Welcome,PasswordReset

gives the error:

Invoke-Scaffolder : A positional parameter cannot be found that accepts argument 'UserMailer'. At line:1 char:1

smsohan commented 10 years ago

Not sure what's up with it. May be uninstall/install the package? I think this is because some files are missing from the package in your installed files.

alvipeo commented 10 years ago

When I Install-Package MvcMailer on VS2013 Preview for MVC5 project it throws this error:

Exception calling "EnumerateFiles" with "3" argument(s): "The path is not of a legal form." At C:...\MVCProject\packages\MvcMailer.4.5\tools\Install.ps1:8 char:8

alvipeo commented 10 years ago

Accidentally I installed MvcMailer for Class Library and it worked.

proff commented 10 years ago

in VS2013 RTM installed over VS2012 i installed mvcmailer on mvc4 project and it does not work. if open this project in VS2012 then works fine

philrowan commented 9 years ago

Some notes on this. I received the same error and after playing around I found that the same message is reported (and not at all helpfully) in VS2013 because the scaffolder is installer twice. Thus I think a reasonable solution is to not install the scaffolder again with the VS2013 package. In the meanwhile, does anyone know how to remove a scaffolder?

PM> get-scaffolder

Name                                Description                                                                                                                             Package                       
----                                -----------                                                                                                                             -------                       
Mailer.Aspx                         Scaffold your mailers using ASPX view                                                                                                   MvcMailer 4.5                 
Mailer.Razor                        Scaffold your mailers using Razor Views                                                                                                 MvcMailer 4.5                 
Mailer.Aspx                         Scaffold your mailers using ASPX view                                                                                                   MvcMailer-vs2013 4.5.1-pre    
Mailer.Razor                        Scaffold your mailers using Razor Views                                                                                                 MvcMailer-vs2013 4.5.1-pre    
T4Scaffolding.CustomScaffolder      Creates an entirely new scaffolder with a PS1 script and a T4 template                                                                  T4Scaffolding.Core 1.0.0      
T4Scaffolding.CustomTemplate        Allows you to modify the T4 template rendered by a scaffolder                                                                           T4Scaffolding.Core 1.0.0      

PM> Scaffold Mailer.Razor
Scaffold : More than one scaffolder matches the name 'Mailer.Razor'
At line:1 char:1
+ Scaffold Mailer.Razor
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-Scaffolder], Exception
    + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.InvokeScaffolderCmdlet

PM> Scaffold Mailer.Razor NewMailer Hello,Welcome
Invoke-Scaffolder : A positional parameter cannot be found that accepts argument 'NewMailer'.
At line:1 char:1
+ Scaffold Mailer.Razor NewMailer Hello,Welcome
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Invoke-Scaffolder], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,T4Scaffolding.Cmdlets.InvokeScaffolderCmdlet