
41 Cal.Rptr.3d 877 (2006)
138 Cal.App.4th 941
Michael KELTON et al., Cross-complainants and Appellants,
v.
Peter T. STRAVINSKI et al., Cross-defendants and Respondents.
No. F047031.
Court of Appeal, Fifth District.
April 20, 2006.
*878 Wild, Carter & Tipton and Steven E. Paganetti, Fresno, for Cross-complainants and Appellants.
Motschiedler, Michaelides & Wishon and Russell K. Ryan, Fresno, for Cross-defendants and Respondents.
Certified for Partial Publication.[*]

OPINION
LEVY, J.
In conjunction with forming a partnership for the purpose of developing industrial warehouses, appellants, Michael Kelton and Kelton & Associates, Inc. (collectively Kelton), and respondents, Peter T. Stravinski and Peter T. Stravinski & Associates, Inc. (collectively Stravinski), each agreed to not build, develop and operate a warehouse without including the other. Based on alleged violations of this covenant, Kelton sought damages from Stravinski. Accordingly, *879 the enforceability of this covenant not to compete is the pivotal issue on appeal.
The trial court determined that this covenant violated Business and Professions Code[1] section 16600 and was therefore unenforceable as a matter of law. Finding that all of Kelton's causes of action against Stravinski in the cross-complaint were premised on the covenant not to compete, the trial court entered judgment for Stravinski. The court first granted summary adjudication on two causes of action in Stravinski's favor and thereafter sustained Stravinski's demurrer without leave to amend on the remaining causes of action.
Kelton contends the covenant not to compete was enforceable because Kelton and Stravinski were involved in an ongoing business relationship. Kelton further argues that even if the covenant is illegal, it should be enforced to prevent Stravinski from being unjustly enriched. Finally, Kelton contends that the cross-complaint as amended stated causes of action that were not based on the covenant not to compete.
As discussed below, the trial court was correct. This covenant not to compete does not come within any exceptions to the general rule that such covenants are void. In the partnership context, an ongoing business relationship does not validate the covenant. Further, this is not a compelling situation that justifies equitable enforcement of the covenant. In the nonpublished part of this opinion, we hold that the demurrer to the amended cross-complaint was properly sustained without leave to amend. Accordingly, the judgment will be affirmed.

BACKGROUND
By an agreement dated May 5, 1992, Stravinski and Kelton formed a general partnership called Warehouse Development Company for the purpose of developing industrial warehouses. Each particular piece of property to be acquired and developed was to be designated by a project statement that would constitute an amendment to the partnership agreement. The parties further agreed that, notwithstanding the existence of this agreement, each partner could "engage in other real estate activities, whether they are competitive with the Partnership or otherwise, without having or incurring any obligation to offer any interest in such activities to the Partnership or the other Partner." Rather, the fiduciary duties of the partners were to be limited "solely to those arising from the acquisition, development, management, holding, and sale of the Property. Without limiting the generality of the foregoing provisions of this Section 5.2, neither party shall have any obligation to refer to the Partnership or to the other Partner any business opportunity, regardless of how appropriate it may be for addition to the Partnership business."
Nevertheless, also on May 5, 1992, Stravinski and Kelton executed a covenant not to compete. Stravinski drafted a letter wherein Kelton agreed to not engage in the business of operating any warehouse and Stravinski agreed to not engage in the business of designing or building any warehouse.
On January 31, 1997, Kelton and Stravinski amended the partnership agreement to narrow the scope of the partnership business. This amendment provided:

*880 "5.1 Purpose of Partnership. The purpose of the Partnership is to continue to own and manage the project identified in that certain Project Statement for Warehouse Development Company, Meklenberg, North Carolina, 1992, . . . and any expansions, extensions or options referred to in the documents pertaining to said project, and activities incidental thereto (the `Clariant/Sandoz Project'). The parties agree that the Partnership shall not undertake any other projects or activities. The Partners further agree that any one or more of the Partners may be, and are free to, engage in other projects of a similar nature, other than the Clariant/Sandoz Project."

At the same time, the parties formed a new partnership called Warehouse Development Company 2. The purpose of this partnership was to develop one or more of four specified projects. Again, this agreement provided that the partners could engage in competitive real estate activities and that neither party had any obligation to refer any business opportunity to the partnership or other partner.
In 2002, Kelton claimed a one-half interest in various projects completed by Stravinski on the ground that these projects violated the May 1992 covenant not to compete. In response, Stravinski and the entities through which Stravinski designed and built these warehouse projects filed a complaint for declaratory relief seeking a judicial determination that the covenant not to compete was either invalid and unenforceable or had been waived or abrogated.
Thereafter, Kelton filed a cross-complaint stating various causes of action based on the alleged breach of the covenant not to compete.
Stravinski moved for summary judgment on the complaint and for summary judgment and/or summary adjudication of each of the causes of action in the cross-complaint on the ground that the covenant not to compete was unenforceable as a matter of law under section 16600. The trial court agreed and granted summary judgment on the complaint and summary adjudication in Stravinski's favor on the first cause of action for breach of written contract and the fifth cause of action for breach of the implied covenant of good faith and fair dealing. The judgment on the complaint for declaratory relief was later revised to exclude Peter T. Stravinski and Peter T. Stravinski and Associates because they remained in the action as cross-defendants.
Thereafter, Stravinski moved for judgment on the pleadings on Kelton's remaining causes of action. Finding that these causes of action were premised solely on the covenant not to compete, the trial court granted Stravinski's motion on the ground that the covenant was unenforceable as a matter of law. However, the court also gave Kelton 30 days leave to amend the cross-complaint.
Kelton filed an amended cross-complaint to which Stravinski demurred. The trial court sustained the demurrer without leave to amend. The court found that the causes of action essentially sought to enforce the covenant not to compete. In making this ruling, the court took judicial notice of Michael Kelton's deposition wherein he testified that the only claimed wrongful conduct against Mr. Stravinski was his involvement in warehouse development projects in violation of the covenant not to compete. Finally, the court determined that the allegations in the amended cross-complaint could not stand in light of the written agreements between the parties encompassing the same subject matter.


*881 DISCUSSION

1. The covenant not to compete is unenforceable as a matter of law.

California has a settled public policy in favor of open competition. (Hill Medical Corp. v. Wycoff (2001) 86 Cal. App.4th 895, 900, 103 Cal.Rptr.2d 779.) Accordingly, the general rule is that covenants not to compete are void. (Id. at p. 901, 103 Cal.Rptr.2d 779.) Section 16600 embodies this prohibition against restraints on trade as follows:
"Except as provided in this chapter, every contract by which anyone is restrained from engaging in a lawful profession, trade, or business of any kind is to that extent void."
Sections 16601 and 16602 permit broad covenants not to compete in two narrow situations, i.e., where a person sells the goodwill of a business and where a partner agrees not to compete in anticipation of dissolution of a partnership. (Kolani v. Gluska (1998) 64 Cal.App.4th 402, 407, 75 Cal.Rptr.2d 257.) Thus, covenants not to compete in contracts other than for either the sale of good will or dissolution of a partnership are void. (Ibid.) Moreover, when a contract creates an illegal restraint on trade, there is nothing that the parties can do that will in any way add to its validity. If the contract is void, it cannot be ratified either by right or by conduct. (South Bay Radiology Medical Associates v. Asher (1990) 220 Cal.App.3d 1074, 1080, 269 Cal.Rptr. 15.)
Here, the covenant not to compete was not executed as part of the sale of the good will of a business or dissolution of a partnership. Thus, no exception exists to prevent application of section 16600. The covenant not to compete violates California's public policy of open competition and therefore is unenforceable.
Kelton acknowledges the general rule but argues this covenant not to compete is valid because the parties were involved in an ongoing business relationship. To support this position, Kelton relies on Dayton Time Lock Service, Inc. v. Silent Watchman Corp. (1975) 52 Cal.App.3d 1, 124 Cal.Rptr. 678.
In Dayton Time Lock Service, Inc., the court was presented with the issue of whether anti-competitive provisions in a franchise agreement violated state and federal antitrust laws. In this context, the court concluded that "[e]xclusive-dealing contracts are not necessarily invalid. They may provide an incentive for the marketing of new products and a guarantee of quality-control distribution. They are proscribed when it is probable that performance of the contract will foreclose competition in a substantial share of the affected line of commerce." (Dayton Time Lock Service, Inc. v. Silent Watchman Corp., supra, 52 Cal.App.3d at p. 6, 124 Cal.Rptr. 678.) However, the business relationship here has little, if any, similarity to the relationship between a franchisor and a franchisee.
Franchising is a heavily regulated form of business in California. (Cislaw v. Southland Corp. (1992) 4 Cal.App.4th 1284, 1288, 6 Cal.Rptr.2d 386.) A franchise is defined as a contract or agreement by which "[a] franchisee is granted the right to engage in the business of offering, selling or distributing goods or services under a marketing plan or system prescribed in substantial part by a franchisor" and "[t]he operation of the franchisee's business pursuant to that plan or system is substantially associated with the franchisor's trademark, service mark, trade name, logotype, advertising, or other commercial symbol designating the franchisor or its affiliate." (§ 20001, subds.(a) and (b).) Accordingly, the franchisor retains some control over *882 the franchisee. If the agreement gives the franchisor complete or substantial control over the franchisee an agency relationship exists. Otherwise, the franchisee will be considered an independent contractor. (Cislaw v. Southland Corp., supra, 4 Cal. App.4th at p. 1288, 6 Cal.Rptr.2d 386.) In any event, the franchisor is permitted to retain such control as is necessary to protect and maintain its trademark, trade name and goodwill. (Id. at p. 1295, 6 Cal.Rptr.2d 386.)
The Dayton Time Lock Service, Inc. court's conclusion that "[e]xclusive-dealing contracts are not necessarily invalid," must be viewed in the context of a franchise relationship. The franchisor must maintain some control over the franchisee. In Dayton Time Lock Service, Inc. the court essentially determined that, as part of that control, a franchisor may employ an "exclusive-dealing contract" to promote and protect the franchise.
Thus, contrary to Kelton's position, Dayton Time Lock Service, Inc. v. Silent Watchman Corp. does not stand for the proposition that section 16600 is inapplicable whenever there is an ongoing business relationship between the parties. Rather, the court's reasoning is tied to the franchise context. The relationship between Kelton and Stravinski as equal partners is vastly different from the relationship between a franchisor and a franchisee. Accordingly, Dayton Time Lock Service, Inc. v. Silent Watchman Corp. is inapposite.
Kelton further argues the covenant not to compete should be enforced because it is consistent with a partner's fiduciary duty under Corporations Code section 16404, subdivision (b)(3). That section provides that a partner has a duty to "refrain from competing with the partnership in the conduct of the partnership business before the dissolution of the partnership." However, the partnership agreements limited the partnership business to specific warehouse projects. Moreover, in both the original partnership agreement and the amendment to it the parties agreed that they could engage in competitive real estate activities and that neither party had any obligation to refer any business opportunity to the partnership or other partner.
Finally, Kelton contends that, even assuming the covenant not to compete is illegal, it should nevertheless be enforced on equitable grounds. According to Kelton, after the covenant not to compete was executed in 1992, Kelton did not independently pursue a warehouse project without first obtaining permission from Stravinski whereas Stravinski secretly pursued warehouse projects without involving Kelton. In this way, Kelton argues, Stravinski was unjustly enriched.
As noted above, the covenant not to compete is void as a violation of public policy. In general, a contract contrary to public policy will not be enforced. (Kashani v. Tsann Kuen China Enterprise Co. (2004) 118 Cal.App.4th 531, 540, 13 Cal. Rptr.3d 174.) "A contract made contrary to public policy or against the express mandate of a statute may not serve as the foundation of any action, either in law or in equity...." (Tiedje v. Aluminum Taper Milling Co. (1956) 46 Cal.2d 450, 453-454, 296 P.2d 554.) Rather, the parties will be left where they are found when they come to a court for relief. (Id. at p. 454, 296 P.2d 554.)
However, California courts have carved out exceptions to this general rule. "In compelling cases, illegal contracts will be enforced in order to `avoid unjust enrichment to a defendant and a disproportionately harsh penalty upon the plaintiff.'" (Asdourian v. Araj (1985) 38 Cal.3d 276, 292, 211 Cal.Rptr. 703, 696 P.2d 95, *883 superseded by statute on other grounds.) Where the public cannot be protected because the transaction has been completed, where no serious moral turpitude is involved, where the defendant is the one guilty of the greatest moral fault, and where the defendant will be unjustly enriched at the expense of the plaintiff, the rule that courts will not enforce an agreement against public policy should not be applied. (Tri-Q, Inc. v. Sta-Hi Corp. (1965) 63 Cal.2d 199, 218-219, 45 Cal.Rptr. 878, 404 P.2d 486.)
Nevertheless, the facts of this case are not "compelling." Stravinski is not guilty of great moral fault by failing to seek Kelton's permission before pursuing warehouse projects. Further, being denied the opportunity to participate in these warehouse projects is not a "disproportionately harsh penalty." Kelton is not seeking restitution of money or consideration paid to Stravinski. Rather, Kelton is seeking potential lost profits. (Cf. Kashani v. Tsann Kuen China Enterprise Co., supra, 118 Cal.App.4th at p. 557, 13 Cal.Rptr.3d 174.) Moreover, Stravinski's alleged wrongdoing, i.e., engaging in competitive real estate activities, is consistent with all of the other written agreements entered into by the parties. Accordingly, equity does not require enforcement of the illegal covenant not to compete.
As a further ground for reversal, Kelton contends the trial court abused its discretion when it denied his request for a continuance of the summary judgment motion to seek additional evidence. However, because the covenant not to compete is unenforceable as a matter of law, additional evidence would not have affected the outcome of the summary judgment/summary adjudication motion. Therefore, no error occurred.

2. The demurrer to the amended cross-complaint was properly sustained without leave to amend.[**]

DISPOSITION
The judgment is affirmed. Respondents are awarded costs on appeal.
WE CONCUR: VARTABEDIAN, Acting P.J., and CORNELL, J.
NOTES
[*]   Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of part 2.
[1]  All further statutory references are to the Business and Professions Code unless otherwise indicated.
[**]   See footnote*, ante.
