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" />