It looks like powershell can't find where log4net.dll is located. As log4net is platform neutral (compiled as any CPU), I don't think 32 x 64 bit OS is issue. Where you have log4net.dll installed? Probably is good idea to put it into GAC. Or put it into folder where powershell is installed. Key is to find where powershell tried to find log4net.dll - is it possible to discover this info? Radovan
From: thiemo.kell...@bfs.admin.ch [mailto:thiemo.kell...@bfs.admin.ch] Sent: Thursday, February 26, 2015 4:19 PM To: log4net-user@logging.apache.org Subject: AW: 64bit problem? Assuming that on either system the most resent framework gets loaded, on both systems 4.0.30319 is used. However, on the server there are both flavours, 32 and 64 bit. I do not know which one is loaded. I forgot to mention that we use log4net 1.2.13, in case this makes a difference. The powershell version on the server is 3, on the laptop it is 4. Liebe Grüsse/Cordialement/Cordialità Thiemo Kellner -- Office fédéral de la statistique Espace de l'Europe 10 2010 Neuchâtel / Suisse IT-AB Tel +41 32 71 36516 Von: Dominik Psenner [mailto:dpsen...@gmail.com] Gesendet: Donnerstag, 26. Februar 2015 15:40 An: 'Log4NET User' Betreff: AW: 64bit problem? To be honest, the error message is rather cryptic to me. What I know is that log4net is not compiled against a specific architecture. If the targeted .NET framework is installed it should work. Have you checked that? Von: thiemo.kell...@bfs.admin.ch<mailto:thiemo.kell...@bfs.admin.ch> [mailto:thiemo.kell...@bfs.admin.ch] Gesendet: Donnerstag, 26. Februar 2015 13:48 An: log4net-user@logging.apache.org<mailto:log4net-user@logging.apache.org> Betreff: AW: 64bit problem? I found https://issues.apache.org/jira/browse/LOG4NET-138 . Maybe there is a problem? Liebe Grüsse/Cordialement/Cordialità Thiemo Kellner -- Office fédéral de la statistique Espace de l'Europe 10 2010 Neuchâtel / Suisse IT-AB Tel +41 32 71 36516 Von: thiemo.kell...@bfs.admin.ch<mailto:thiemo.kell...@bfs.admin.ch> [mailto:thiemo.kell...@bfs.admin.ch] Gesendet: Donnerstag, 26. Februar 2015 13:36 An: log4net-user@logging.apache.org<mailto:log4net-user@logging.apache.org> Betreff: 64bit problem? Hi all I am at my wits' end. We developped PowerShell script which uses log4net. I can run the script successfully from a batch file on my laptop but on the server I get Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed. I:\WA_ANALYSE\AAA_INFA_CORE\Scripts\metadata_join_params-thiemo.ps1 : Exception calling "LoadFile" with "1" argument(s): "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))" At line:1 char:1 + I:\WA_ANALYSE\AAA_INFA_CORE\Scripts\metadata_join_params-thiemo.ps1 -stat_activi ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep tion + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio n,metadata_join_params-thiemo.ps1 I found http://stackoverflow.com/questions/10249406/powershell-v2-load-a-com-interop-dll which points to a possible problem with mixing 32 dlls in 64 bit PowerShell. As my laptop is 32 and the server 64 bit, I was wondering if this might cause the problem. At least I could pin the line of code where the exception gets thrown: [void][Reflection.Assembly]::LoadFile($log4netDllPathString) Has anyone an idea? Liebe Grüsse/Cordialement/Cordialità Thiemo Kellner -- Office fédéral de la statistique Espace de l'Europe 10 2010 Neuchâtel / Suisse IT-AB Tel +41 32 71 36516