Search code examples
c#.net-2.0delphi-prism

How do I check if a Delphi Prism project is a website?


I want to check if a project is a website.

I did it with the Project class, with the Property property, by checking if CurrentWebsiteLanguage has value, or is null. However, that doesn't work for Delphi Prism websites.

So, I tried by checking the AspnetVersion property, but it throws an exception.

'System.Reflection.TargetInvocationException'. Predefined type 'Microsoft.CSharp.RuntimeBinder.Binder' is not defined or imported


Solution

  • A google search for that error is bringing up cases where people didn't reference all the assemblies they needed to reference while using the dynamic keyword.

    Add references in your project to Microsoft.CSharp.dll and System.Core.dll and that particular error should go away.