错误提示:
Unit Borland.Delphi.System was compiled with a different version of (null).Object
是不是因为版不兼容的原因?我系统安装的是简体中文1.1版的.net framework源文件如下:
<%@ Page Language="Delphi" ContentType="text/html" ResponseEncoding="gb2312" %>
<html>
<script language="Delphi" runat="server">
procedure ButtonClick(Sender: System.Object; E: EventArgs);
begin
Message.Text := Edit1.Text;
end;
</script>
<body>
<form runat="server">
<asp:textbox ID="Edit1" runat="server" TextMode="SingleLine" />
<asp:button ID="Button1" runat="server" Text="按钮" OnClick="ButtonClick"/>
</form>
<p>
<asp:label ID="Message" runat="server"></asp:label>
</p>
</body>
</html>
Unit Borland.Delphi.System was compiled with a different version of (null).Object
是不是因为版不兼容的原因?我系统安装的是简体中文1.1版的.net framework源文件如下:
<%@ Page Language="Delphi" ContentType="text/html" ResponseEncoding="gb2312" %>
<html>
<script language="Delphi" runat="server">
procedure ButtonClick(Sender: System.Object; E: EventArgs);
begin
Message.Text := Edit1.Text;
end;
</script>
<body>
<form runat="server">
<asp:textbox ID="Edit1" runat="server" TextMode="SingleLine" />
<asp:button ID="Button1" runat="server" Text="按钮" OnClick="ButtonClick"/>
</form>
<p>
<asp:label ID="Message" runat="server"></asp:label>
</p>
</body>
</html>
如果你安装的.NET Framework不同于1.0.3705,请运行C:\Program Files\Borland\Delphi For .NET Preview\Source的rebuild.bat重新建立对应版本的库文件。否则,编译Delphi for .NET文件时会出现版本不一致的错误!
原文如下: As delivered, Delphi for .NET Preview is supported on the .NET
Framework version 1.0.3705. If you install
any other .NET Framework version or Service Pack on your machine, you
must rebuild the Delphi for .NET Preview RTL units to synchronize with
your .NET Framework version. Borland has included a batch file to perform the rebuild: * Open a command prompt window, and change to your
Preview installation directory.
(default: C:\Program Files\Borland\Delphi for .NET Preview) * rebuild.bat is in the source directory under
the Preview installation. CD to that directory and
execute the command:
rebuild
* The batch file will rebuild the precompiled units
in the units directory. It will also copy the rebuilt
units over to the aspx\units directory.