|
I cannot get the Rebex libraries to load in PowerShell. Exception calling "Load" with "1" argument(s): "Could not load file or assembly 'Rebex.Mail' or one of its dependencies. The system cannot find the file specified." At line:1 char:28 + [Reflection.Assembly]::Load <<<< ("Rebex.Mail") + CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : DotNetMethodException and using the path with [Reflection.Assembly]::LoadFrom() gives the same error. Thanks! |
|
well you are using .NET4, so you need to tell powershell to load the .NET4 environment "The solution is pretty simple – just tell PowerShell to use a later version of the CLR. To do this, you need to create a config file, named PowerShell.Exe.Config, located in the same folder as PowerShell.Exe (and another one for PowerShellISE.Exe, or PowerShellISE.Exe.Config). These config files contain a small bit of XML to tell the system which version of the CLR to use. To access the .NET 4.0 versions, use the following:"
see http://tfl09.blogspot.com/2010/08/using-newer-versions-of-net-with.html If you don't need any .NET4 features in PowerShell, an easier solultion would be to simply use .NET2 build of Rebex Mail.
(29 Sep '11, 15:39)
Lukas Pokorny ♦♦
|