我如何修复Delphi Prism ASP.NET错误:“解析器错误消息:'Oxygene'不是支持语言”
-
09-10-2019 - |
题
我在Delphi Prism中写了ASP.NET Web应用程序(不是站点)。一切正常在我的DevLopment Machine上正常工作,但是当我在测试服务器上安装它时,我会收到以下错误:
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
我已经阅读了我在网上可以找到的所有内容。几篇文章提到了一个remobjects页面(http://devcenter.remobjects.com/articles/?id= = {b549afb8-04c8-4574-b185-30de14369e66}),不幸的是,不再存在。
一些链接表明您可以将语言=“氧”更改为语言=“ 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?)
还有其他人遇到这些问题吗?
解决方案
- 有几种解决这个问题的方法。最简单的方法:如果您控制服务器,则通过安装命令行版本。
- 另一种方法是预编译,它需要 Web部署项目 去做这个。执行此操作时,请确保取消选中可更新的选项。
- 借助2010年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版本。