Why is my PowerShell host running as 32-bit on a 64-bit machine? -
i'm building powershell host in vs 2012, in c# (.net 4.5) console project. project configured cpu , 'prefer 32-bit' not checked. i've added reference system.management.automation manually adding
<reference include="system.management.automation" />
to itemgroup other references in .csproj file. getting odd behaviour reading registry (missing keys, etc.) , realised looking @ x86 part. ran script in host:
if ([system.intptr]::size -eq 4) { "32-bit" } else { "64-bit" }
and got
"32-bit"
which wasn't surprise given behaviour, surprise given configuration. got ideas? there hosted powershell has x86?
on off-chance, tried checking 'prefer 32-bit' box, saving project, un-checking , saving project again. after this, built 64-bit. info, visual studio 2012 update 2 (11.0.60315.01).
Comments
Post a Comment