如何检查 Delphi Prism 项目是否是网站?

发布于 2024-12-19 16:38:43 字数 377 浏览 5 评论 0原文

我想检查一个项目是否是一个网站。

我使用 Project 类和 Property 属性来完成此操作,方法是检查 CurrentWebsiteLanguage 是否具有值,或者是否为 null。但是,这不适用于 Delphi Prism 网站。

因此,我尝试检查 AspnetVersion 属性,但它引发了异常。

“System.Reflection.TargetInitationException”。预定义类型“Microsoft.CSharp.RuntimeBinder.Binder”未定义或导入

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

筑梦 2024-12-26 16:38:43

谷歌搜索该错误时发现,人们在使用 dynamic 关键字时没有引用他们需要引用的所有程序集。

在项目中添加对 Microsoft.CSharp.dllSystem 的引用.Core.dll 并且该特定错误应该消失。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文