如何修复Delphi Prism ASP.NET错误:"解析器错误消息:'Oxygene'不是受支持的语言"

nor*_*aul 2 .net asp.net delphi remobjects delphi-prism

我在Delphi Prism中编写了一个ASP.NET Web应用程序(不是站点).在我的devlopment机器上一切正常,但是当我在测试服务器上安装它时,我收到以下错误:

Server Error in '/MyApp' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: 'Oxygene' is not a supported language.

Source Error:

Line 1:  <%@ Application CodeBehind="Global.asax.pas" Inherits="MyApp.Global_asax" Language="Oxygene" %>


Source File: /MyApp/global.asax    Line: 1 
Run Code Online (Sandbox Code Playgroud)

我已经阅读了我在网上找到的所有内容.有几篇文章提到了一个RemObjects页面(http://devcenter.remobjects.com/articles/?id={B549AFB8-04C8-4574-B185-30DE14369E66}),遗憾的是,它不再存在.

一些链接表明您可以将Language ="Oxygene"更改为Language ="C#".尝试这会产生不同的错误:

Compiler Error Message: CS1061: 'ASP.login_aspx' does not contain a definition for 'ForgottenUsernameLinkButton_Click' and no extension method 'ForgottenUsernameLinkButton_Click' accepting a first argument of type 'ASP.login_aspx' could be found (are you missing a using directive or an assembly reference?)
Run Code Online (Sandbox Code Playgroud)

还有其他人遇到过这些问题吗?

Car*_*Kok 5

  1. 有几种方法可以解决这个问题.最简单的方法:如果您通过安装命令行版本来控制服务器.
  2. 另一种方法是预编译,它:您需要Web部署项目才能执行此操作.执行此操作时,请确保取消选中可更新选项.
  3. 使用8月版的构建,您可以将.compiler,.codemodel,.pdb,.cirrus复制到Bin /,然后复制到您的web.config中,添加如下内容:

<system.codedom> <compilers>
<compiler language="Chrome" extension=".pas" type="RemObjects.Oxygene.CodeDom.OxygeneCodeProvider, RemObjects.Oxygene.CodeModel, Version=4.0.0.800, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098" />
<compiler language="Oxygene" extension=".pas" type="RemObjects.Oxygene.CodeDom.OxygeneCodeProvider, RemObjects.Oxygene.CodeModel, Version=4.0.0.800, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098" /> </compilers> </system.codedom>

请注意,在此要求版本号(4.0.0.800)必须与您拥有的CodeModel DLL的DLL版本匹配.