On Wed, Aug 25, 2010 at 3:23 PM, Luke Bakken <luke.bak...@gmail.com> wrote:
> It appears that nant reads the 32 bit registry. Test build script:
>
> <project name="test.nant" default="test"
> xmlns="http://nant.sf.net/nightly/2010-05-12-0.91/nant.xsd";>
>
>  <target name="test">
>    <readregistry
>        property="installRoot"
>        key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
>        hive="LocalMachine" />
>    <echo message="installRoot: ${installRoot}
> ${framework::get-framework-directory('net-4.0')}" />
>  </target>
>
> </project>
>
> On my 64 bit machine, I would expect installRoot to be
> "C:\Windows\Microsoft.NET\Framework64\", but it is
> "C:\Windows\Microsoft.NET\Framework\", which is under the
> "Wow6432Node" in the registry.

Additional info:

I should have said I'm running Windows 7 x64, NAnt 0.91 (Build
0.91.3784.0; nightly; 5/12/2010)

Test program:

using System;
using Microsoft.Win32;
public static class RegCheck
{
    public static void Main()
    {
        
Console.WriteLine(Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\.NETFramework",
false).GetValue("InstallRoot").ToString());
    }
}

Compiled with "csc regcheck.cs" and then run, I get this output:

C:\Windows\Microsoft.NET\Framework64\

Compiled with "csc /platform:x86 regcheck.cs" and run:

C:\Windows\Microsoft.NET\Framework\

I haven't build nant from source (yet), but running corflags.exe on
nant says it's "Any CPU":

Version   : v1.0.3705
CLR Header: 2.0
PE        : PE32
CorFlags  : 1
ILONLY    : 1
32BIT     : 0
Signed    : 0

I'm stumped!
Thanks,
Luke

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to