2012-09-24 119 views
6

尝试编译我的MonoTouch项目时突然开始出现以下错误。错误CS5001:exe不包含适用于入口点的静态`Main'方法

错误CS5001:程序 'MyApp.exe的' 不包含适合的切入点(CS5001)一个静态的 '主' 方法(MyApp的)

下面是我的Main.cs样子。

using System; 
using System.Collections.Generic; 
using System.Linq; 

using MonoTouch.Foundation; 
using MonoTouch.UIKit; 

namespace MyApp 
{ 
    public class Application 
    { 
     static void Main (string[] args) 
     { 
      UIApplication.Main (args, null, "AppDelegate"); 
     } 
    } 
} 

任何想法我能做些什么来解决这个问题?或者我需要创建一个新的解决方案?

+0

你使用哪个版本的MonoTouch?如果您创建新项目,是否显示该消息? –

+0

Im使用MonoDevelop V 3.0.4.7和MonoTouch v 6.0.0 –

+0

新项目工作正常,它看起来像是在我的项目中已损坏,只是不知道是什么? –

回答

-1

也许你可以错过STAThread:

[STAThread] 
static void Main(string[] args) 
{ 
... 
} 
相关问题