现在已经得到一个webApp的所有文件,怎么在程序中用Compiler类来动态编译这个项目呢?
我用Compiler.compile()编译了WebForm1.aspx.cs Global.asax.cs AssemblyInfo.cs 这三个文件,
提示说程序未定义入口点,应该怎么办?还有,如果有.csproj文件的话能直接编译它么?
我编译的结果是“命名空间并不直接包含诸如字段或方法之类的成员”求助···thx```

解决方案 »

  1.   

    怎么没人理阿···~~~~><~~~~~~
      

  2.   

    csc /t:library /out:YourApp.dll WebForm1.aspx.cs Global.asax.cs AssemblyInfo.cs>>>还有,如果有.csproj文件的话能直接编译它么?
    >>>我编译的结果是“命名空间并不直接包含诸如字段或方法之类的成员”something could be wrong with your code
      

  3.   

    模仿一下这个看看。。aspnet_compiler.exe
      

  4.   

    thanks to  saucer and lovebanyi^_^
    问题已解决,原来是compile()时option参数没有写上target:library,把它当一个exe编译了现在我的网页也是在自己机器上没问题,在别人机器上出现 
    The Microsoft Jet database engine cannot find the input table or query '&#891;'. 
    因为用的是一个中文的table名,感觉应该是encoding的时候错误 
    这个应该怎么解决阿?