Nant build issue: Failed to initialize the Microsoft .NET compact framework

576 views Asked by At

i have some problems regarding building .NET solution for handheld device using NAnt 0.92. The solution consists of typical csproj and CAB installer (vddproj). The target platform is .NET CF 3.5.

However, if i set the target platform in the script as:

< property name="nant.settings.currentframework" value="netcf-3.5" />

when i execute then i receive an error:

Target framework could not be changed. "netcf-3.5" is not a valid framework identifier.

This means that i cannot build solutions for target platform 3.5. Logically, i have tried with CF 2.0 afterwards:

< property name="nant.settings.currentframework" value="netcf-2.0" />

and then i receive an error

Failed to initialize the 'Microsoft .NET Compact Framework 2.0' (netcf-2.0) target framework. Registry path not found! - key = 'SOFTWARE\MICROSOFT......'

I have the proper SDK installed as some other posts suggested. Also, tried to disable the antivirus, as also suggested in similar posts, but couldn't find any solution.

Can you give any advice, please?

Thank you in advance. Daniel

1

There are 1 answers

0
Marcel Dutt On

I know it's a bit late but I would suggest that you're using NAnt only to trigger MSBuild.exe. Thats what we're doing in our CI environment and it works perfectly. Also make sure that your project is a smart device project or else it won't build correctly. I'm not even sure if NAnt supports the CF 3.5 (anymore).