PrimeDigit – A Design Blog by Will Shaver

April 20, 2010

NAnt on Windows 7 x64 with Visual Studio 2010

Filed under: Uncategorized — Will @ 11:11 am

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

Powered by WordPress