why 不行??E:\>csc /t:library c1.csE:\>csc /t:library /r:c1.dll c2.csit works for me, when you run test.aspx, make sure you copy both dlls into the bin subdirectory

解决方案 »

  1.   

    saucer(思归, MS .NET MVP)
    我这里用E:\>csc /t:library /r:c1.dll c2.cs
    的时候会报错:c2.cs(1,11): error CS1002: 应输入 
    :(
      

  2.   

    that is odd, I just copied your code and tried, I didn't get any compiler errorswhere is your c1.dll? in the same directory as c1.cs and c2.cs, right?
      

  3.   

    ok, here is what I got:E:\>dir
    12/20/2002  10:50p                  95 c1.cs
    12/20/2002  10:50p                  91 c2.cs
    12/20/2002  10:52p                  92 test.aspx
    E:\>csc /t:library c1.cs
    Microsoft (R) Visual C# .NET Compiler version 7.00.9466
    for Microsoft (R) .NET Framework version 1.0.3705
    Copyright (C) Microsoft Corporation 2001. All rights reserved.
    E:\>csc /t:library /r:c1.dll c2.cs
    Microsoft (R) Visual C# .NET Compiler version 7.00.9466
    for Microsoft (R) .NET Framework version 1.0.3705
    Copyright (C) Microsoft Corporation 2001. All rights reserved.
    E:\>dir
    12/20/2002  10:50p                  95 c1.cs
    12/20/2002  11:26p               3,072 c1.dll
    12/20/2002  10:50p                  91 c2.cs
    12/20/2002  11:26p               3,072 c2.dll
    12/20/2002  10:52p                  92 test.aspx
      

  4.   

    public class c2:System.Web.UI.Page
    难道不需要system.web.dll??手中没工具无法测试,
      

  5.   

    saucer:
    http://expert.csdn.net/Expert/topic/1282/1282818.xml?temp=.4203455
     这里来签个名,:)