ms-help://MS.VSCC/MS.MSDNVS/cscomp/html/vcrefcsharpcompileroptionsbycategory.htm

解决方案 »

  1.   

    可以用命令行编译,参考
    ms-help://MS.VSCC/MS.MSDNVS.2052/cscomp/html/vcrefCompilerOptions.htm
      

  2.   

    开始菜单——》
    Microsoft Visual Studio .NET->Visual Studio .NET 工具->Visual Studio .NET 命令提示
    进入命令行方式:
    然后
    CSC 你的文件名 
    还有一些参数可以设置~~
    csc /? 可以看参数
      

  3.   

    csc /type:library /out:name  yourfile
      

  4.   

    csc /t:library /r:System.dll /r:System.Data.dll /r:System.Xml.dll file.cs
      

  5.   

    一个单独的cs文件,我推荐你用Editplus吧,在Editplus中加几个参数,就是一个很好的C#编辑器了:))当然只是单独文件来说.
      

  6.   

    1:一个单独的CS 文件如何在Visual .net中编译,是不是必须先建立一个工程  呢 ?如不需要该怎么操作启动:「开始」菜单\程序\Microsoft Visual Studio .NET\Visual Studio .NET 工具\Visual Studio .NET 命令提示在该提示符状态使用csc /t:winexe mycs.cs/t: 的参数有/target:exe             生成控制台可执行文件(默认) (缩写: /t:exe)
    /target:winexe          生成 Windows 可执行文件 (缩写: /t:winexe)
    /target:library         生成库 (缩写: /t:library)
    /target:module          生成能添加到其他程序集的模块 (缩写: /t:module)2:一个CS 文件如何编译成.DLL 文件上一个问题里已经解了,/t:library 比如csc /t:library mycs.cs
      

  7.   

    要注意的是 .net 库文件应该使用 regasm 进行注册,而不再是regsvr32