OPINION OF THE COURT
Balio, J.Plaintiff Williamson commenced this action to recover damages for additional costs incurred in connection with work performed on a public contract to repair a roof on defendant’s highway garage. The complaint asserted two causes of action: breach of contract and unjust enrichment. Following joinder of issue, both parties moved for summary judgment. Special Term granted summary judgment on the cause of action for breach of contract, but only for a portion of the damages claimed by plaintiff.1 We conclude that Special Term erred by finding that defendant breached its contract with the plaintiff.
I
The essential facts are not in dispute. The Town of Parish advertised for bids to repair the roof of its highway garage. The specifications for the work accompanied the advertisement. Before advertising for bids, the town did not determine the classifications of workers that would be employed on the project as mandated by Labor Law § 220 (3-a) (a). As a result, the Commissioner of Labor was not called upon to perform her statutory duties to make appropriate classifications, prepare a schedule of prevailing wages, or forward that schedule to the town prior to the advertisement, and the schedule of prevailing wages was not annexed to the specifications for the work (see, Labor Law § 220 [3], [3-a] [a]). Indeed, the specifications made no mention of prevailing wages.
Plaintiff, who had prior experience with public contracts *100and who had worked on contracts where prevailing wages were paid, submitted its bid and was awarded the contract. Plaintiff’s president offered to draft the contract and, following consultation with the Town Attorney, prepared the contract which was executed by the parties. The agreement made no mention of wages, and the specifications were not incorporated as part of the contract. Plaintiff performed its duties under the contract and was paid the contract price. Thereafter, the Department of Labor cited the town for a violation of subdivision (3-a) of Labor Law § 220. The Department also determined that plaintiff had not paid the prevailing wage to its employees and directed that plaintiff pay specified employees the difference between the prevailing wage and the wages actually paid. Plaintiff did not seek judicial review of that determination and, instead, complied with the directive and commenced this action to recover the amount paid, plus overhead and profit.
II
Plaintiff claims that the town breached its contract (1) by failing to apply for a wage schedule; (2) by failing to annex a wage schedule to the bid specifications or the contract; and (3) by failing to include a provision in the contract requiring payment of the prevailing wage. We hold that the failure to perform these statutory requirements does not give rise to liability for breach of contract or for the negligent performance of a contractual duty.2
Plaintiff’s claim is predicated solely upon the town’s failure to perform the specified statutory duties.
The failure to apply for a wage schedule or to annex the schedule to the bid specifications cannot be a basis for contract liability because those omissions occurred prior to formation of the contract. Where both parties completely ignore the statutory scheme prior to formation or execution of the contract, no liability can arise on a theory of contractual breach (Brang Co. v State Univ. Constr. Fund, 47 AD2d 178, 179; 24 Opns St Comp, 1968, at 225-226).
No contractual liability exists for the failure to include the *101prevailing wage provision in the contract for another reason. Subdivision (3) of Labor Law § 220 does not compel the governmental entity to prepare the contract. Although that responsibility ordinarily is assumed by the political subdivision, plaintiff offered to, and did, prepare the subject contract after consultation with the Town Attorney. Since plaintiff assumed the responsibility of preparing the agreement based upon representations about its experience in dealing with municipalities, any contractual liability for the omission of a necessary provision should be imposed upon plaintiff, not the town. Moreover, no liability may be imposed for negligent performance of a contractual duty because the alleged omissions occurred prior to execution of the agreement and not during performance of its terms.
Ill
Plaintiff is not entitled to recover upon the ground of unjust enrichment.
For purposes of this appeal, we assume that the town has been enriched because it has received the benefit of labor and services at less than the prevailing wage.3 Mere enrichment is not enough, however, to warrant liability in quasi contract (22 NY Jur 2d, Contracts § 450). The defendant’s conduct must have been of such nature that in equity and good conscience, it ought not to be allowed to retain the benefit (Bradkin v Leverton, 26 NY2d 192, 197; see also, 22 NY Jur 2d, Contracts, § 450). In the subject case, there is no claim, that at the time the contract was signed, the town knew that plaintiff would perform the contract by paying less than the prevailing wage. Although the town should be charged with knowledge of its duty to obtain a schedule of prevailing wages, plaintiff, an experienced public work contractor, likewise knew or should have known of the prevailing wage requirement and is chargeable with such knowledge (Village of Medina v Dingledine, 211 NY 24, 28; see also, Matter of Cam-Ful Indus. v Roberts, 128 AD2d 1006, 1007). Moreover, to allow recovery by plaintiff would circumvent a statute designed to serve the public good and impose a fiscal burden upon the town and its taxpayers, *102who are intended beneficiaries of the statutory scheme (Village of Medina v Dingledine, supra, at 29; see also, Associated Bldrs. & Contrs. v City of Rochester, 67 NY2d 854; Fata v Healy Co., 289 NY 401; Matter of General Bldg. Contrs. v Board of Trustees, 42 AD2d 660). Assuming, arguendo, that the fully performed written contract does not preclude quasi contractual relief based upon unjust enrichment (see, Clark-Fitzpatrick, Inc. v Long Is. R. R. Co., 70 NY2d 882, 388-389), the town’s retention of the benefits of the contract would not, under these circumstances, amount to an unjust enrichment.
IV
The complaint seeks damages for breach of contract and unjust enrichment. Certain allegations could, however, be viewed as stating a tort claim for violation of a statutory duty.4 Though not raised by the parties, we exercise our discretion to consider whether, separate from any liability on the theory of contract or unjust enrichment, plaintiff is entitled to recover damages upon the theory that defendant was negligent in failing to perform a duty imposed by a statute.5
Labor Law § 220 governs the hours and wages of laborers, workers and mechanics employed on public works contracts. All contracts within the section’s scope must contain provisions concerning the maximum hours of labor per week and requiring contractors or employers to pay prevailing wages and fringe benefit supplements to those workers. The local governmental entity in charge of the project is required to prepare the classifications of workers required for the project and to forward that classification to the Commissioner of Labor. The Commissioner then is to prepare the proper classification of workers and a schedule of prevailing wages and supplements for each class of worker. The schedule is to be forwarded to the local entity and must be annexed to the work specifications prior to advertising for bids. The employer *103may contest the Commissioner’s determination as to prevailing wages and supplements (Labor Law § 220 [6]). The statute includes procedures for administrative enforcement of its provisions and empowers the Commissioner to determine whether an employer or contractor has violated the statute, to direct the employer or contractor to pay the difference between the actual wages paid and the prevailing wage and to provide the appropriate supplements and in addition, to impose a civil penalty and interest. Further, a criminal sanction may be imposed upon a contractor who willfully pays less than the prevailing wage or supplements set forth in the contract. Any aggrieved party may commence a CPLR article 78 proceeding to review the Commissioner’s determination concerning compliance with the statute, and any worker may also commence an action against the contractor or employer to recover the difference between the wages actually paid and supplements actually provided and those wages and supplements required to be provided under the section (Labor Law §220 [8]).
The express language of Labor Law § 220 imposes no liability upon a governmental entity for the statutory violations committed in this case and does not create any remedy in the nature of a plenary action for the benefit of contractors. We further conclude that the creation of any such remedy or liability may not be implied from the language, purpose or intent of the statute.
"A statute 'creates’ no liability unless it discloses an intention express or implied that from disregard of a statutory command a liability for resultant damages shall arise 'which would not exist but for the statute’ ” (Schmidt v Merchants Desp. Transp. Co., 270 NY 287, 305). A liability is not created every time a statute imposes a new duty different from that required by custom or common law (supra, at 304). Liability for the violation of a statute may be implied only when the statute is designed to protect a particular class of persons against an invasion of a property or personal interest (Motyka v City of Amsterdam, 15 NY2d 134, 139; Koenig v Patrick Constr. Corp., 298 NY 313, 317; Schmidt v Merchants Desp. Transp. Co., supra, at 305).
It is well settled that the primary purpose and intent of the prevailing wage law (Labor Law § 220) is to protect workers by ensuring that they have an effective remedy to secure the prevailing wage and supplements (Bucci v Village of Port Chester, 22 NY2d 195, 201; Fata v Healy Co., 289 NY 401, 405; *104Austin v City of New York, 258 NY 113, 117; Matter of Yerry v Goodsell, 4 AD2d 395, affd 4 NY2d 999). The statute is also part of the competitive bidding process and as such, is intended to protect the public fisc and to benefit and protect local governments and their taxpayers (Associated Bldrs. & Contrs. v City of Rochester, 67 NY2d 854, supra; Fata v Healy Co., supra; Matter of General Bldg. Contrs. v Board of Trustees, 42 AD2d 660, supra; see also, Matter of Allen v Eberling, 24 AD2d 594). Consistent with the primary intent to protect workers, the Legislature has imposed both civil and criminal liability upon employers and contractors and has created a specific remedy in favor of workers and against contractors or employers for recovery of the prevailing wage and supplements. The express imposition of liability and creation of particular remedies suggests that the Legislature did not intend to impose any other liability or create other remedies (see, CETA Workers’ Org. Comm. v City of New York, 617 F2d 926; McKinney’s Cons Laws of NY, Book 1, Statutes §§ 74, 240) and that, except for preexisting common-law remedies, the Legislature intended the specific remedies it created to be the exclusive remedies (see, Fata v Healy Co., supra; Matter of Yerry v Goodsell, supra; 56 NY Jur, Statutes § 274).
The Legislature, by amending subdivision (3) of the statute to require a schedule of prevailing wages and supplements to be annexed to the work specifications, provided an incidental benefit to contractors by affording them foreknowledge of the requirements and by placing nonunion and union contractors on an equal footing at the bidding stage (Matter of Action Elec. Contrs. Co. v Goldin, 64 NY2d 213, 222; Brang Co. v State Univ. Constr. Fund, 47 AD2d 178, 179, supra). However, our examination of the Governor’s Bill Jackets for the principal legislation concerning this subdivision (L 1933, ch 731; L 1956, ch 750) indicates that the primary purpose of each enactment was to strengthen the position of union laborers and workers in the competitive bidding process and that any benefit to contractors was incidental and simply the procedural means of protecting labor. Any protection afforded contractors was limited and was not designed to allow contractors to obtain reimbursement for additional labor costs (Brang Co. v State Univ. Constr. Fund, supra, at 179). Additionally, we must assume that the Legislature, when it amended subdivision (3), was aware of the numerous remedies available to *105contractors at the bidding stage.6 Labor Law §220 has been amended on numerous occasions, and the Legislature has had ample opportunity to express its intent to create a new liability in favor of contractors. Although it has afforded contractors an opportunity to contest administrative determinations, the Legislature has continually increased the liability of contractors to provide the prevailing wage and supplements as well as the right of employees to enforce their rights against contractors. The creation of remedies in favor of workers and against contractors, together with the primary purpose of protecting the employees of contractors, fails to support an implication that the Legislature intended to create a cause of action in favor of contractors for a violation of the statute. Moreover, to allow a contractor to sue a local government to recoup additional moneys it expended to comply with the prevailing wage statute would reward the contractor for his violation of the statute, subvert the statutory scheme of placing all bidders on an equal footing, and impose an unwarranted burden upon intended beneficiaries of the competitive bidding process, the town and its taxpayers (see, Associated Bldrs. & Contrs. v City of Rochester, 67 NY2d 854, supra; Village of Medina v Dingledine, 211 NY 24, supra; 24 Opns St Comp, 1968, at 225-226).
Finally, assuming, arguendo, that a tort cause of action does exist for a violation of the statute, plaintiff failed to *106allege compliance with General Municipal Law § 50-e and Town Law § 67 (2), and the record indicates that plaintiff did not comply with those statutory requirements. The filing of a notice of claim is a condition precedent to a tort action against the town, and compliance with the filing requirement is part of plaintiffs substantive cause of action (Saler v City of New York, 96 AD2d 583; Doran v Town of Cheektowaga, 54 AD2d 178; Siegel, NY Prac §32, at 33). A complaint that fails to allege compliance is legally insufficient and must be dismissed for failure to state a cause of action (Davidson v Bronx Mun. Hosp., 64 NY2d 59, 62; Doran v Town of Cheektowaga, supra; Richardson v City of Lockport, 3 AD2d 812; Fullam v Westchester County Playland Commn., 276 App Div 925). The failure to allege compliance is not an affirmative defense to be raised by the town, is not waived by the town’s failure to raise it in the answer, and may be considered for the first time on appeal (Camarella v East Irondequoit Cent. School Bd., 41 AD2d 29, 31, affd 34 NY2d 139; Hart v East Plaza, 62 AD2d 113, 117; Giles v County of Otsego, 27 Misc 2d 749; Lubarsky v City of Long Beach, 205 Misc 153; Siegel, NY Prac § 32).
Accordingly, the order appealed from should be reversed and defendant’s motion for summary judgment should be granted.
. Plaintiff has not appealed from the court’s determination of the amount of damages, and that issue is not before us.
. We consider the allegations of negligent performance of a contractual duty to assert a contract claim, not a tort claim (see, Video Corp. v Flatto Assocs., 58 NY2d 1026; Sears, Roebuck & Co. v Enco Assocs., 43 NY2d 389; McLaughlin, 1983 Supp Practice Commentaries, McKinney’s Cons Laws of NY, Book 7B, CPLR C213:2,1988 Pocket Part, at 167).
. Special Term granted summary judgment without reaching the issue of unjust enrichment. Had the issue been considered, the court would have been obliged to review the affidavits in a light favorable to the plaintiff and to credit plaintiff’s averments that it was unaware of the prevailing wage requirements.
. The complaint alleges that the town "breached its legal duty and its agreement with the plaintiff in that it failed, refused and neglected to get a wage schedule and make the wage schedule a part of the specifications and contract * * * By reason of the failure, refusal and neglect of the Town to perform its duty, the plaintiff was required to incur greater expenses for labor not required, specified nor mentioned in the contract.”
. The issue of liability upon a tort theory was not raised before Special Term and has not been raised on appeal. Since we conclude that there is no liability for breach of contract and in light of our power to search the record, we deem it appropriate to consider the merits, if any, of a tort claim.
. The statutory provision which the dissenters contend creates a remedy in favor of contractors is the third unnumbered paragraph of subdivision (3). That paragraph requires certain acts to be performed prior to advertising for bids. The dissent’s claim that contractors have no practical remedy for a violation of that paragraph misses the mark. Since contractors are chargeable with knowledge of the statutory requirements (see, Village of Medina v Dingledine, 211 NY 24), there are many remedies which could be exercised at the bidding stage. The contractor could (1) refuse to bid, (2) rescind or withdraw the bid, (3) institute timely proceedings to restrain the award of a contract and to compel compliance with the statute, (4) institute a special proceeding to reopen the bidding, or (5) institute a proceeding to annul the contract award (see, Matter of Cataract Disposal v Town Bd., 53 NY2d 266; Matter of General Bldg. Contrs. v Egan, 106 AD2d 688, lv denied 65 NY2d 601; Arrow Louver & Damper Div. v New York City Tr. Auth., 106 AD2d 533; Balaban-Gordon Co. v Brighton Sewer Dist. No. 2, 41 AD2d 246; Matter of De Foe Corp. v Larocca, 128 Misc 2d 39, affd 110 AD2d 965, lv denied 65 NY2d 603). Had appropriate remedies been exercised prior to performance, plaintiff would not have been directed to pay additional wages, and the competitive bidding process would have been followed. The recovery sought by plaintiff here subverts that process by rewarding plaintiff for an erroneous bid and by permitting the contractor to amend that bid after completion of the contract.