
43 So.3d 93 (2010)
VENEZIA LAKES HOMEOWNERS ASSOCIATION, INC., Appellant,
v.
CSX TRANSPORTATION, INC., Appellee.
No. 3D09-1314.
District Court of Appeal of Florida, Third District.
August 4, 2010.
Rehearing Denied September 23, 2010.
*94 William J. Motyczka; G. David O'Leary, for appellant.
Holland & Knight and Tiffani G. Lee, Miami, for appellee.
Before CORTIÑAS and ROTHENBERG, JJ., and SCHWARTZ, Senior Judge.
ROTHENBERG, J.
The primary issue presented in this appeal is whether the trial court erred in granting CSX Transportation's ("CSX") motion to dismiss on the grounds that the Venezia Lakes Homeowners Association ("Venezia") is not a party to the agreement at issue in its action against CSX. Finding no error, we affirm.
Venezia sought a declaration of its rights under a Crossing Agreement that was made between the Three Lakes Property Owners Association ("Three Lakes") and CSX, which granted Three Lakes a license to construct and use two private roads over CSX's railroad tracks to access recreational facilities, in exchange for an annual payment. Following the execution of the Crossing Agreement, a developer built the Venezia Lakes community on an adjoining parcel north of Three Lakes. Three Lakes and Venezia then entered into a facilities agreement to share the recreational facilities, with Venezia paying part of the annual payment to CSX. Venezia did not seek or obtain a modification to the Crossing Agreement.
Following a dispute between Venezia and Three Lakes over the amount Venezia was paying under their facilities agreement, Venezia filed a verified complaint for declaratory and injunctive relief against *95 Three Lakes and CSX. CSX moved to dismiss the complaint, and following a hearing, the trial court granted the motion. Venezia did not respond to CSX's motion to dismiss and did not bring a court reporter to the hearing on the matter. Also, Venezia did not file for a motion for rehearing or proffer what it would have alleged had the trial court granted its ore tenus motion to amend its complaint. Although Venezia attempted to obtain an approved statement of the hearing, this attempt was unsuccessful because the parties disputed what occurred at the hearing and the trial court did not sufficiently recall the proceedings.
Venezia contends that it is a third-party beneficiary of the Crossing Agreement and thus, a party in interest to the agreement between CSX and Three Lakes. We disagree.
Under Florida law, a third party is considered a beneficiary of the contract only if the contracting parties intended to primarily and directly benefit the third party. Networkip, LLC v. Spread Enters., Inc., 922 So.2d 355, 358 (Fla. 3d DCA 2006). "[T]he test is whether the parties to the contract intend that a third person be benefited by the contract, not whether a party to the contract is liable to a third person as a consequence of entering into the agreement." Id. (citing Marianna Lime Prods. v. McKay, 109 Fla. 275, 147 So. 264 (1933)).
The Crossing Agreement conclusively establishes that Venezia is not entitled to declaratory relief as a third-party beneficiary because the parties to the Crossing Agreement did not intend that the agreement be for the benefit of Venezia at the time they entered into the agreement. The Crossing Agreement expressly excludes third-party beneficiaries: "Neither this Agreement nor any provision hereof or agreement or provision included herein by reference shall operate or be construed as being for the benefit of any third person."
Accordingly, it is clear that CSX did not intend to extend the benefit of its agreement with Three Lakes to some unknown third party. We therefore conclude that Venezia was not a party nor a third party beneficiary to the Crossing Agreement and therefore, the trial court properly granted CSX's motion to dismiss.
We find no abuse of discretion in the trial court's denial of Venezia's ore tenus motion for leave to amend its complaint. Because the Crossing Agreement clearly and unambiguously excludes third-party beneficiaries, amendment of the complaint would be futile. See Am. Seafood, Inc. v. Clawson, 598 So.2d 273, 274 (Fla. 3d DCA 1992) (affirming dismissal with prejudice where exhibits attached to the complaint established that plaintiff had no cause of action against defendants).
Affirmed.
