I am trying to install scaffolding package in VS2010 SP1 in MVC4(aim is to user MvcMailer), here are the command I run
PM> install-package T4Scaffolding
PM> install-package MvcScaffolding
and installing T4Scaffolding gives me this error:
Import-Module : Could not load file or assembly 'file:///path/packages\T4Scaffolding.1.0.5\tools\T4Scaffolding.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
if I use installed it again, it installed but when I use Scaffolding command gives me this error
PM> Scaffolding Mailer.Razor UserMailer subs
The term 'Scaffolding' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:12 + Scaffolding <<<< Mailer.Razor UserMailer subs + CategoryInfo : ObjectNotFound: (Scaffolding:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I tried uninstalling and deleting the packages and re installing but no luck. I tried update command on both packages but nothing.
When I run import-module "dllpath"
I get same error message i.e.
Could not load file or assembly 'file:///path/packages\T4Scaffolding.1.0.5\tools\T4Scaffolding.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Tried restarting VS after uninstall, install, reinstall all possible but nothing changed.
What I am doing wrong.
EDIT: I have tried to use power shell
PS C:\Windows\system32> import-module "path\T4Scaffolding.1.0.5\tools\T4Scaffolding.dll" Import-Module : Could not load file or assembly 'file:///path\T4Scaffolding.1.0.5\tools\T4Scaffolding.d ll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. At line:1 char:14 + import-module <<<< "path\T4Scaffolding.1.0.5\tools\T4Scaffolding.dll" + CategoryInfo : NotSpecified: (:) [Import-Module], BadImageFormatException + FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.ImportModuleCommand
It gives error "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." I believe here is the start failing point. Any idea? how to fix this first.