
178 N.W.2d 215 (1970)
Jack E. ANDERSON, et al., Respondents,
v.
CITY OF MINNEAPOLIS, Appellant.
No. 42140.
Supreme Court of Minnesota.
June 5, 1970.
*216 Keith M. Stidd, City Atty., Robert J. Alfton, Asst. City Atty., Minneapolis, for appellant.
Cochrane & Bresnahan, St. Paul, for respondents.
Heard before NELSON, MURPHY, SHERAN, PETERSON and JAMES F. MURPHY, JJ.

OPINION
SHERAN, Justice.
Appeal from an order of the municipal court denying defendant's motion for judgment notwithstanding the verdict or a new trial.
*217 Plaintiffs, owners of real estate, sued the city of Minneapolis for damages which resulted when a building permit issued for the construction of a garage on September 6, 1967, was canceled as of September 21, 1967, upon the ground that the structure involved was of a kind not permitted under the applicable provisions of the Minneapolis zoning ordinance. A jury returned a verdict for plaintiffs in the amount of $910. This appeal followed the denial of the post-trial motion.
We are compelled to reverse for these reasons:
(1) The act of an employee of the city in issuing the building permit in a doubtful case involved an exercise of discretion in the sense that the city's employee had to make a judgment as to whether plans submitted in support of the application for the permit constituted a permissible use of the property in the area involved. State ex rel. Howard v. Village of Roseville, 244 Minn. 343, 70 N.W.2d 404; Kiges v. City of St. Paul, 240 Minn. 522, 62 N.W. 2d 363; Lowry v. City of Mankato, 231 Minn. 108, 42 N.W.2d 553; Roerig v. Houghton, 144 Minn. 231, 175 N.W. 542; Lerch v. City of Duluth, 88 Minn. 295, 92 N.W. 1116. A claim based upon performance of, or failure to perform, a discretionary function or duty cannot be asserted against a municipal corporation, and this is true whether or not the discretion is abused. Minn.St. 466.03, subd. 6.
(2) If the proposed use authorized by the building permit was clearly illegal, so that no element of discretion or judgment should have been exercised by the city's employee, the owner is precluded from recovering damages because he and those who act for him are charged with the knowledge of the laws regulating the granting of the permit and any expense incurred is at the owner's risk, at least in so far as the city is concerned. W. H. Barber Co. v. City of Minneapolis, 227 Minn. 77, 34 N.W.2d 710; Newcomb v. Teske, 225 Minn. 223, 30 N.W.2d 354; Alexander Co. v. City of Owatonna, 222 Minn. 312, 24 N.W.2d 244.
(3) Finally, there was a failure in this case to give the required notice of claim "within 30 days after the alleged loss or injury" as required by § 466.05. No notice of any kind was filed until January 25, 1968. The fact that the presentation of claim was deferred by plaintiffs pending determination of their application for a variance permit is immaterial. See, Johnson v. City of Chisholm, 222 Minn. 179, 24 N.W.2d 232.
Defendant's motion for judgment in its favor notwithstanding the verdict in favor of plaintiffs should have been granted.
Reversed.
