NAnt on Windows 7 x64 with Visual Studio 2010

Trying to build NHibernate from a fresh install of VS 2010 and NAnt beta .90 caused me all sorts of headaches. I couldn’t get NAnt to target .Net 3.5. Here’s the error:

check-framework-version:

[echo] Running with net-2.0

BUILD FAILED

C:\Projects\OpenSource\NHibernate\default.build(117,5):
ERROR: NHibernate requires .Net 3.5.

Turns out the NAnt config is pointing at the wrong registry key. Perhaps visual stuido 2010 release is different than previous beta versions. A simple update to the registry key for the net-3.5 framework target fixed it. Previous version:


<readregistry
property="sdkInstallRoot"
key="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0\WinSDK\InstallationFolder"
hive="LocalMachine"
failonerror="false" />

Corrected:

<readregistry
property="sdkInstallRoot"
key="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\InstallationFolder"
hive="LocalMachine"
failonerror="false" />

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>