The reason for this could be an existing installation of JEDI library, which includes MsTask unit too. Just adjust your project library path settings to include the Scheduling Agent sources' path before the JEDI's.