Could not load file or assembly 'file:///C:\windows\system32\Wi ndowsPowerShell\v1.0\Modules\DLLName\DLLName.dll' or one of its dependencies.

Jul 12, 2013 at 4:51 PM

I have created functionality that I use via the module mechanism.
As we all know, running the script on my machine works ;).
On the deployment server I can also import the module in PowerShell via "Import-Module 'ModuleName' -DisableNameChecking without any error.

But somehow when tfdeployer is running this script the module can't be loaded.

I have the same version(3.0.-1.-1) of PowerShell running on my windows 8 and on the deployment Windows Server 2008 R2 Service Pack 1.

Another part of the error is: "This assembly is built b y a runtime newer than the currently loaded runtime and cannot be loaded."

Do you know what might be causing this?

Kind Regards,
Jul 12, 2013 at 6:53 PM
Already found the problem.

I changed the RunnerType in the DeploymentMapping from PowerShell to PowerShellV3.