Search code examples
nantdelay-sign

Why do I receive the warning "The SDK for the 'net-2.0' framework is not available or not configured." when running a delay-sign task in NAnt?


I'm using NAnt 0.85 as a build script. Part of the script is to complete the signing process of delay-signed assemblies using the delay-sign task.

When the script is executed on the build server, it runs without any problems.

When I run the same script on my local development machine, I get the warning:

The SDK for the 'net-2.0' framework is not available or not configured.
     at NAnt.Core.Tasks.ExternalProgramBase.DetermineFilePath()
     at NAnt.Core.Tasks.ExternalProgramBase.get_ProgramFileName()
     at NAnt.Core.Tasks.ExternalProgramBase.PrepareProcess(Process process)
     at NAnt.Core.Tasks.ExternalProgramBase.StartProcess()
     at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask()
     at NAnt.DotNet.Tasks.DelaySignTask.ExecuteTask()
     at NAnt.Core.Task.Execute()
     at NAnt.Core.Target.Execute()
     at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
     at NAnt.Core.Tasks.CallTask.ExecuteTask()
     at NAnt.Core.Task.Execute()
     at NAnt.Core.Target.Execute()
     at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
     at NAnt.Core.Project.Execute()
     at NAnt.Core.Project.Run()

I'm pretty sure I've got the SDK installed with Visual Studio 2008/2010.

Why do I receive this error and what can I do to diagnose the problem further?


Solution

  • The error is because I didn't have the .NET 2.0 SDK. I assumed SDKs were installed with Visual Studio, but apparently only the current version is. For 2008, that's .NET 3.5 SDK, not 2.0 and previous versions aren't provided.

    Downloading and installing the 2.0 SDK from Microsoft resolved the issue.