4
Vote

Installation problem

description

PM> install-package mvcscaffolding
'T4Scaffolding (≥ 1.0.0)' not installed. Attempting to retrieve dependency from source...
Done.
Successfully installed 'T4Scaffolding 1.0.0'.
Successfully installed 'MvcScaffolding 1.0.0'.
Successfully added 'T4Scaffolding 1.0.0' to Presentation.
Successfully added 'MvcScaffolding 1.0.0' to Presentation.
Install-Package : Exception calling "EnumerateFiles" with "3" argument(s): "The path is not of a legal form."
At line:1 char:16
  • install-package <<<< mvcscaffolding
    • CategoryInfo : NotSpecified: (:) [Install-Package], CmdletInvocationException
    • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM>

After this, I can generate a controller and the dbcontext, but no views generate

I've tried uninstalling all the packages, I've tried a brand new mvc3 solution. Just cannot get this to work.

comments

Piquet wrote May 16, 2011 at 7:58 AM

Another install - different location

PM> install-package mvcscaffolding
'T4Scaffolding (≥ 1.0.0)' not installed. Attempting to retrieve dependency from source...
Done.
Successfully installed 'T4Scaffolding 1.0.0'.
Successfully installed 'MvcScaffolding 1.0.0'.
Successfully added 'T4Scaffolding 1.0.0' to uVent.
Successfully added 'MvcScaffolding 1.0.0' to uVent.
Exception calling "EnumerateFiles" with "3" argument(s): "The path is not of a legal form."
At C:\workspace\uVent\Build\packages\MvcScaffolding.1.0.0\tools\install.ps1:10 char:45
  • | %{ [System.IO.Directory]::EnumerateFiles <<<< ($_, "*." + $extension, [System.IO.SearchOption]::AllDirectories) }
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : DotNetMethodException

IainGalloway wrote Jun 9, 2011 at 4:30 PM

This is caused by the install script failing to detect which view engine you're using - thus the controller scaffolder doesn't know how to make the views.

You can fix it yourself in your solution by pasting "Set-DefaultScaffolder -Name View -Scaffolder MvcScaffolding.AspxView -SolutionWide" into the package manager console (or similar for Razor).

I (or someone else perhaps) will eventually take a look at that install script and fix it.

tarr11 wrote May 31, 2013 at 7:00 PM

This is still happening.

The fix mentioned above does not work.

In my case, I just hardcoded to RazorView on line 53
$viewScaffolder = "MvcScaffolding.RazorView"