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

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -