Question: How do you resolve: Asp.Net Core 3.1 Razor View Error: CS1963: An expression tree may not contain a dynamic operation Answer: It is most likely that you haven't defined a @modal in one of the ViewComponents or the View. Double-check and see if you have @modals in your ViewComponent cshtml files. Let me know if this resolves the problem by leaving a comment below: You don't have to sign up for an account or login to comment.