I’ve had this error pop up nearly 20 times when setting up CCNET through the years. Unfortunately I never notated what I had to do to fix it. I usually just spent 20 minutes banging my head against the wall trying to figure it out. Then when I finally do figure it out I never notate it down. Well, this time I’m going to notate it here so I can fix it next time real quick and hopefully someone else will find this useful through “teh internets” as well.
The Error
BUILD FAILED
Failed to initialize the ‘Microsoft .NET Framework 2.0’ (net-2.0) target framework.
Property evaluation failed.
Expression: ${path::combine(sdkInstallRoot, ‘bin’)}
^^^^^^^^^^^^^^Property ‘sdkInstallRoot’ has not been set.
Expression: ${path::combine(sdkInstallRoot, ‘bin’)}
How to Resolve
Open the nant.exe.config file and scroll down until you find this entry.
<readregistry property="sdkInstallRoot" key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRootv2.0" hive="LocalMachine" failonerror="false" />
You’re going to replace the Key with this:
<readregistry property="sdkInstallRoot" key="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.1\WinSDKNetFxTools\InstallationFolder" hive="LocalMachine" failonerror="false" />
We’re changing the location of the sdk’s install root.
Now, everything should be gravy. Key word: SHOULD
Fred says
Hi Donn
Thanks for the post. Small update: For .NET 4.0 change the key to
“SOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0AWinSDK-NetFx40ToolsInstallationFolder”
Fred
Donn Felker says
Thanks for the update! Much appreciated. 🙂