When you want to add an assembly from a network UNC share using the command:
$scriptPath = Split-Path ($MyInvocation.MyCommand.Path)
Add-Type -path "$scriptPathselenium-dotnet
et40WebDriver.dll"
you might face such an error:
Add-Type: Could not load file or assembly 'file:///Z:A-BackupUsersAdministr
atorDesktopMAXIMO Automaticselenium-dotnet
et40WebDriver.dll' or one of it
s dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515
)
At Z:A-BackupUsersAdministratorDesktopMAXIMO AutomaticMAXIMO Automatic.ps
1:14 char:1
+ Add-Type -path "$scriptPathselenium-dotnet
et40WebDriver.dll"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-Type], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell
.Commands.AddTypeCommand
How can I fix this problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…