
182 Cal.App.2d 637 (1960)
PRECISION FABRICATORS, INC. (a Corporation), Respondent,
v.
HENRY LEVANT, Appellant.
Civ. No. 24385. 
California Court of Appeals. Second Dist., Div. Two.  
July 13, 1960.
 Gerald H. Gottlieb and Arthur Magid for Appellant.
 Irving S. Baltimore and W. L. Engelhardt for Respondent.
 FOX, P. J.
 Plaintiff Precision Fabricators, Inc., a duly licensed general contractor and builder, entered into a contract on November 1, 1954, with defendant Levant for the construction of a bowling alley at Reseda, California. The building was constructed according to the plans and specifications with certain modifications and was completed some two months beyond the time stipulated in the contract. The plaintiff brought this action to recover sums due under an alleged accord and account stated which, claimed the plaintiff, was entered into by the parties in full satisfaction of their claims against one another. The defendant denied that an accord was reached and counterclaimed for damages caused by the delay in completion.
 The court below found that an accord in the amount of $10,000 was reached on September 13, 1955, and the sum of $3,000 was paid by defendant on that accord. The plaintiff was therefore awarded judgment in the amount of $7,000, interest and costs. The defendant has appealed from the judgment and the order denying his motion for a new trial.
 The basic issue to be resolved is whether or not the trial court erred in excluding all evidence proffered by the defendant relative to the existence of an alleged joint venture between the plaintiff and one of his subcontractors, Jim Ray, who had an individual license, for the construction of the defendant's bowling alley. When this evidence was excluded by the trial court, the defendant made several offers of proof,  [fn. 1]*640 which, if substantiated by proper evidence, would have tended to establish a joint venture.
 Thereafter, in the examination of Jim Ray, the defendant again attempted  [fn. 2] to show the existence of a joint venture between the plaintiff and Ray. Finally, in an affidavit attached to his motion for new trial, the defendant filed a letter from the plaintiff to Jim Ray which in pertinent part is set out in the margin.  [fn. 3]
 [1] Whether a joint venture exists must largely depend upon determining the intention of the parties from the facts *641 of a particular case because there is no certain and all-inclusive definition (Holtz v. United Plumbing & Heating Co., 49 Cal.2d 501, 506 [319 P.2d 617].) [2] A joint venture has been defined in various ways but most frequently as "an association of two or more persons who combine their property, skill or knowledge to carry out a single business enterprise for profit." (Holtz v. United Plumbing & Heating Co., supra.) [3] It has been generally held that the evidence must show a community of interest in an enterprise, a sharing of profits and losses, and joint participation in the conduct of the business, in order to establish a joint venture. (Holtz v. United Plumbing & Heating Co., supra, at 507; Lasry v. Lederman, 147 Cal.App.2d 480, 485-486 [305 P.2d 663]).
 [4] So, in the present case the facts which defendant offered to prove, if supported by the evidence, would have tended to show the elements necessary to establish a joint venture. Though the ultimate resolution of the joint venture issue is necessarily one for the trier of fact (Bunn v. Lucas, Pino & Lucas, 172 Cal.App.2d 450, 462 [342 P.2d 508]; Cutter Laboratories, Inc. v. R. W. Ogle & Co., 151 Cal.App.2d 410, 417 [311 P.2d 627]), we must assume, for purposes of this appeal, that a joint venture between the plaintiff and Ray could be established by competent evidence, in order to determine whether or not the trial court was correct in excluding that evidence.
 The following provisions of the Business and Professions Code must be considered in resolving the basic issue. Section 7029 specifies that "It is unlawful for any two or more licensees, each of whom has been issued a license to engage separately in the business or to act separately in the capacity of a contractor within this State, to jointly submit a bid or otherwise act in the capacity of a contractor within this State without first having secured an additional license for acting in the capacity of such a joint venture or combination in accordance with the provisions of this chapter as provided for an individual, co-partnership or corporation." (Emphasis added.) Section 7026 defines "a contractor" as "any person ... who undertakes to or offers to undertake to or purports *642 to have the capacity to undertake to or submits a bid to, or does himself or by or through others, construct, alter, repair ... or demolish any building ... or other structure, project, development or improvement, or to do any part thereof, ..." Furthermore, section 7031 provides that "No person engaged in the business or acting in the capacity of a contractor, may bring or maintain any action in any court of this State for the collection of compensation for the performance of any act or contract for which a license is required by this chapter without alleging and proving that he was a duly licensed contractor at all times during the performance of such act or contract." It is clear from the foregoing sections that if plaintiff and Ray were joint venturers in building the bowling alley, plaintiff would not be entitled to recover in this action, because, although each had an individual license, they did not have the required license to act in such joint capacity. (Lewis & Queen v. N. M. Ball Sons, 48 Cal.2d 141, 147 [308 P.2d 713]; Loving & Evans v. Blick, 33 Cal.2d 603, 607 [204 P.2d 23]; Franklin v. Nat C. Goldstone Agency, 33 Cal.2d 628, 631 [204 P.2d 37]; Gatti v. Highland Park Builders, Inc., 27 Cal.2d 687, 689 [166 P.2d 265].)
 The plaintiff, however, makes the unmeritorious contention that the alleged illegality should have been pleaded as an affirmative defense. [5] The rule regarding the issue of illegality in these license cases is stated in Lewis & Queen v. N. M. Ball Sons, supra, at pages 147-148: "Whatever the state of the pleadings, when the evidence shows that the plaintiff in substance seeks to enforce an illegal contract or recover compensation for an illegal act, the court has both the power and duty to ascertain the true facts in order that it may not unwittingly lend its assistance to the consummation or encouragement of what public policy forbids. [Citations.] [6] It is immaterial that the parties, whether by inadvertence or consent, even at the trial, do not raise the issue. The court may do so of its own motion when the testimony produces evidence of illegality."
 [7a] If the plaintiff and Ray had both signed the original contract as joint venturers, proof of a joint venturer's license would be required under the statutes. (Loving & Evans v. Blick, supra, p. 607; Lewis & Queen v. N. M. Ball Sons, supra, p. 147.) The plaintiff contends that the facts of the case indicate an exception to the statutory rule in that only the plaintiff and defendant were signatories to the contract, and that the licensing laws were designed to protect *643 only those persons who by contract engage the services of builders. An examination of the statutes indicates that the contention is without merit. Neither section 7026 nor 7029 limit the license requirements to those whose names appear on the contract. In fact, section 7026 expressly defines a contractor as any person who "does by himself or by or through others, construct, alter, repair, add to, ..." (Emphasis added.) The emphasized portion of the statute clearly indicates that a license is required even where a person or firm acts through agents, partners or joint venturers. Furthermore, we cannot see how the statutory requirement for a joint venturer license would be satisfied even though the evidence might show that the joint venture was not entered into until after the construction contract was executed. Sections 7029 and 7026 clearly relate to a contractor's acts of construction, alteration and repair, and not to the date of entering into the contract. [8] A license is required at all times during the performance of the contract in order for a contractor to prevail. (Bus. & Prof. Code,  7031; Albaugh v. Moss Construction Co., 125 Cal.App.2d 126, 132 [269 P.2d 936].) [7b] If the plaintiff and Ray were joint venturers during the performance of the contract, the plaintiff was required to allege and prove the existence of a joint venturer's license. (Bus. & Prof. Code,  7031.)
 [9] The plaintiff's next contention is that even though a joint venturer's license was required, the violation was a technical one only, for the reason that both Ray and the plaintiff were duly licensed individually as general contractors. This argument ignores the express language of section 7029 which requires a joint venturer's license even though the individual venturers are properly licensed (Lewis & Queen v. N. M. Ball Sons, supra, p. 150). The fact that both plaintiff and Ray were licensed individually does not bring the substantial compliance doctrine of Gatti v. Highland Park Builders, Inc., supra, 27 Cal.2d 687 into play. In the Gatti case the court noted one important factor, in addition to individual licenses, which constituted a substantial compliance with section 7029. The plaintiffs (together with a third party) actually obtained a joint venturer's license during the performance of the contract. There has been no evidence introduced to indicate that the plaintiff and Ray were licensed as joint venturers at any time during the performance of the contract.
 The fact that suit was brought on the accord and account *644 stated instead of on the contract is of no avail to the plaintiff. [10] First, release from or cancellation of an illegal contract can never be a valid consideration so as to support an accord (Shortell v. Evans-Ferguson Corporation, 98 Cal.App. 650, 655 [277 P. 519]; Stonehocker v. Cassano, 154 Cal.App.2d 732, 736 [316 P.2d 717]). [11] Second, the fact that the parties have reduced an illegal contract to an accord can have no more validity than if they had obtained an arbitration award (Loving & Evans v. Blick, supra, p. 611) or if the plaintiff were attempting to enforce a mechanic's lien (Holm v. Bramwell, 20 Cal.App.2d 332, 334 [67 P.2d 114]). These acts do not purge the original matter of its illegality so as to permit this court to enforce the contract indirectly (Loving & Evans v. Blick, supra). [12] Where an illegality is shown to exist, the courts will leave the parties where they were at the outset (Wells v. Comstock, 46 Cal.2d 528, 532 [297 P.2d 961]).
 In Lewis & Queen v. N. M. Ball Sons, supra, the issue was the validity of a suit on labor and material bonds where the plaintiffs were not properly licensed joint venturers. The court, in rejecting the plaintiffs' claim, at pages 154-155 said: "In view of the purpose of section 7031, we can see no reason to distinguish an action on a bond. In all of these cases the object of the plaintiff is to obtain, more or less directly, compensation for unlicensed work. The deterrent purpose behind section 7031 would be frustrated if the plaintiff, prevented from obtaining compensation directly by an action on his contract, could obtain it indirectly by an action on a bond." The same inevitable logic applies with equal force to the instant case.
 It is therefore apparent that the exclusion of the proffered evidence relating to the alleged joint venture between the plaintiff and Ray was prejudicial error.
 Since an order denying a motion for a new trial is not appealable (Rodriguez v. Barnett, 52 Cal.2d 154, 156 [338 P.2d 907]) the attempted appeal therefrom is dismissed. The judgment is reversed and the cause is remanded for further proceedings not inconsistent with the views herein expressed.
 Ashburn, J., and Richards, J. pro tem.,  [fn. *] concurred.
 "December 3, 1954"
 "Jim Ray"
 11923 E. Washington
 Whittier, Calif.
 "Sir:"
 "Please be advised contract for the Reseda Bowling Alley has been negotiated, with Precision Fabricators, Inc. as contractor, and placed in escrow."
 "We also wish to confirm in writing our understanding of the agreement with you, i.e., all profits or losses are to be shared equally between Jim Ray and Precision Fabricators, Inc."
 "Trusting our venture will be mutually profitable, we remain"
 Very truly yours,
 /s/ Gilbert H. Cate
 Gilbert H. Cate, Pres.
 Precision Fabricators, Inc.""
NOTES
[fn. 1]  1. The defendant's various offers of proof are summarized as follows: "... the plaintiff has throughout the course of the construction, as of the time of the original contract and thereafter as to all matters referring to the matters in issue worked as a joint venturer with another person, with another company .... Another thing that will be shown is that there was no meeting of the requirements with respect to joint venturers as set up in the Business and Professions Code .... We now have discovered as a matter of fact the joint venturer was a party to the contract although not a signatory, an undisclosed party to the contract .... In other words, they were ... intertwined very closely in terms of division of profit, division of losses, division of labor .... What we are offering to prove is that there was a joint adventurer throughout the whole transaction and there was division of profits and loss, there was later billing between the parties on the basis that the operations were done jointly, there was joint discussion with respect to the bid itself .... We [have] now discovered that as a matter of fact throughout the whole transaction and from the beginning and even ... before the signing of the original contract and during the time that the plaintiffs were purporting to make a claim resulting in the causes of action in this lawsuit that at all times they were in a coadventurer status with Mr. James Ray and his company; ... we offer to show in this connection that the profits and losses were under the coadventurer agreement to be shared and shared equally; that the management was to be shared and shared equally and all the responsibilities under coadventurer status were and all the other incidents were throughout the course of this transaction in existence and operating."
[fn. 2]  2. "Q. Are you familiar with the construction contract and construction of Reseda Bowl? A. I am. Q. In what connection are you familiar? A. I erected the building. Q. And in doing so were you working alone? A. No. Q. With whom were you working? A. Precision Fabricators. Q. What was your relationship to Precision Fabricators in regard to that work? [Plaintiff's objection sustained] Were you in a fiduciary relationship with Precision Fabricators in connection with this work? [Plaintiff's objection sustained] Q. Did you, Mr. Ray, participate in conferences with Precision Fabricators with relation to that work? [Plaintiff's objection sustained] Q. Did you participate in the development of the estimates for the purpose of making a bid on that job? [Plaintiff's objection sustained] Q. And did you review the various cost items for the purpose of determining the estimates for that work? [Plaintiff's objection sustained] Q. And were you aware of which items were to be included within the contract and which were to be excluded from the contract in its actual performance? [Plaintiff's objection sustained]"
[fn. 3]  3
[fn. *]  *. Assigned by Chairman of Judicial Council.
