Compiler Error Cs5001
Contents |
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs error 1 program does not contain a static 'main' method suitable for an entry point and reference Dev centers Retired content Samples We’re sorry. The content you
Asp.net 5 Program Does Not Contain A Static 'main' Method Suitable For An Entry Point
requested has been removed. You’ll be auto redirected in 1 second. MSDN Library MSDN Library MSDN Library MSDN
Does Not Contain A Static Main Method C# Console Application
Library Design Tools Development Tools and Languages Mobile and Embedded Development .NET Development Office development Online Services Open Specifications patterns & practices Servers and Enterprise Development Speech Technologies Web Development
Program Does Not Contain A Static Main Method Visual Studio
Windows Desktop App Development TOC Collapse the table of content Expand the table of content This documentation is archived and is not being maintained. This documentation is archived and is not being maintained. Compiler Error CS5001 Other Versions Visual Studio 2008 Visual Studio 2005 Visual Studio .NET 2003 Program 'program' does not contain a static 'Main' method suitable for an a project with an output type of class library cannot be started directly entry pointThis error occurs when no static Main method with a correct signature is found in the code that produces an executable file. This error also occurs if the entry point function, Main, is defined with the wrong case, such as lower-case main.Main must be declared as static and it must return void or int, and it must have either no parameters or else one parameter of type string[].ExampleThe following example generates CS5001: Copy // CS5001.cs // CS5001 expected public class a { // Uncomment the following line to resolve. // static void Main() {} } See AlsoMain() and Command-Line Arguments (C# Programming Guide) Show: Inherited Protected Print Export (0) Print Export (0) Share IN THIS ARTICLE Is this page helpful? Yes No Additional feedback? 1500 characters remaining Submit Skip this Thank you! We appreciate your feedback. Dev centers Windows Office Visual Studio Microsoft Azure More... Learning resources Microsoft Virtual Academy Channel 9 MSDN Magazine Community Forums Blogs Codeplex Support Self support Programs BizSpark (for startups) Microsoft Imagine (for students) United States (English) Newsletter Privacy & cookies Te
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the c# main method company Business Learn more about hiring developers or posting ads with us Stack Overflow metadata file could not be found Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error CS5001: exe does not contain a static `Main' method suitable for an entry point up vote 5 down https://msdn.microsoft.com/en-us/library/1y814bzs.aspx vote favorite 1 I have all of a sudden started to receive the following error when trying to compile my MonoTouch Project. Error CS5001: Program 'MyApp.exe' does not contain a static 'Main' method suitable for an entry point (CS5001) (MyApp) Below is what my Main.cs looks like. 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, http://stackoverflow.com/questions/12561052/error-cs5001-exe-does-not-contain-a-static-main-method-suitable-for-an-entry "AppDelegate"); } } } Any idea what I can do to fix the issue? Or do I need to create a new solution? c# osx mono xamarin.ios monodevelop share|improve this question edited Sep 25 '12 at 16:18 PaulG 9,71662960 asked Sep 24 '12 at 8:04 Mike U 5381825 Which MonoTouch version did you use? Did that message appears if you create new project? –Maxim Korobov Sep 24 '12 at 8:20 Im using MonoDevelop V 3.0.4.7 and MonoTouch v 6.0.0 –Mike U Sep 24 '12 at 8:46 New projects work fine, it looks like something has got corrupted in my project, just not sure what? –Mike U Sep 24 '12 at 8:46 8 What is the BuildAction of your Main.cs (right-click the file in MonoDevelop)? It should be set to 'Compile'. –Rolf Bjarne Kvinge Sep 24 '12 at 8:47 Thanks Rolf, that was it for some reason it had got changed to Content. –Mike U Sep 24 '12 at 8:49 | show 2 more comments 1 Answer 1 active oldest votes up vote 0 down vote Perhaps you could have missed STAThread: [STAThread] static void Main(string[] args) { ... } share|improve this answer answered Jun 19 '13 at 9:00 andreassjoberg 362 add a comment| Your Answer draft save
down your search results by suggesting possible matches as you type. Showing results for Search instead for Do you mean Search the Community Advanced Search Forums | Ideas Browse by product Products http://forums.autodesk.com/t5/net/cs5001-program-program-does-not-contain-a-static-main-method/td-p/2629324 3ds Max A360 Products Advance Steel Alias APIs and Programming ArtCAM AutoCAD AutoCAD 360 AutoCAD Architecture AutoCAD Civil 3D AutoCAD Electrical AutoCAD for Mac AutoCAD Land Desktop http://qatech.online/compiler-error-cs5001/3556/ AutoCAD LT AutoCAD Map 3D AutoCAD Mechanical AutoCAD MEP AutoCAD P&ID AutoCAD Plant 3D AutoCAD Raster Design AutoCAD Structural Detailing AutoCAD Utility Design Autodesk Media and does not Entertainment AutoSketch BIM 360 Building Ops Buzzsaw BXD: Synthesis CFD Configurator 360 Constructware Design Review DWG TrueView Exchange Apps Fabrication FeatureCAM Flow Design ForceEffect FormIt 360 Fusion 360 Fusion Connect Fusion Lifecycle Fusion Team Game Making Helius Composite Helius PFA Infrastructure Map Server InfraWorks 360 Insight 360 Inventor Inventor HSM & HSMWorks CAM Maya does not contain Mechanical Desktop Mockup 360 Moldflow Nastran Nastran In-CAD Navisworks Point Layout PowerInspect PowerMill PowerShape ReCap 360 ReMake Remote Revit Robot Structural Analysis Screencast & Project PRAXIS SimStudio Simulation Mechanical Smoke Structural Bridge Design Vault VRED New Users Getting Started with your Autodesk Product Suites Factory Design Utilities Product Design Suite International Forums Deutsch Español Français Português Русский Türkiye 日本語 中文 Other Forums Community Topics Autodesk Labs Archived Forums Close .NET Autodesk Community > AutoCAD > AutoCAD Customization > .NET > CS5001, Program 'program' does not contain a static 'Main' method AutoCAD: AutoCAD Customization: .NET: CS5001, Program 'program' does not contain a static 'Main' method: Page 1 .NET Reply Topic Options Subscribe to RSS Feed Mark Topic as New Mark Topic as Read Float this Topic to the Top Bookmark Subscribe Printer Friendly Page « Message Listing « Previous Topic Next Topic » MartinSi Archived Account 7 Posts