Add-Type : Could not load file or assembly '' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
This can be solved as follows:
- Locate the Powershell executable. This is either under C:\Windows\System32\WindowsPowershell\v1.0 in a 32-bit machine, or C:\windows\SysSOS64\WindowsPowerShell\v1.0 in a 64-bit machine.
- Check if a file called PowerShell.exe.config exists. If it does, edit it. If it does not, create it.
- Make sure this config file contains these lines.
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
No comments:
Post a Comment