Csc Error Cs5001 Program
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 error 1 program '' does not contain a static 'main' method suitable for an entry point 9 Documentation APIs and reference Dev centers Retired content Samples We’re
Asp.net 5 Program Does Not Contain A Static 'main' Method Suitable For An Entry Point
sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. MSDN Library does not contain a static main method c# console application MSDN Library MSDN Library MSDN Library Design Tools Development Tools and Languages Mobile and Embedded Development .NET Development Office development Online Services Open Specifications patterns & practices Servers
Visual Studio Program Does Not Contain A Static Main Method
and Enterprise Development Speech Technologies Web Development 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' a project with an output type of class library cannot be started directly does not contain a static 'Main' method suitable for an 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 Bl
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings
C# Main Method
and policies of this site About Us Learn more about Stack Overflow
Metadata File Could Not Be Found
the company Business Learn more about hiring developers or posting ads with us Stack Overflow 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; https://msdn.microsoft.com/en-us/library/1y814bzs.aspx it only takes a minute: Sign up MSBuild is saying I need a Main method for a library compilation up vote 0 down vote favorite I'm trying to use MSBuild to compile my ASP.NET MVC3 applicaiton. Since DLL's don't require a Main method and I have specified that the target is a Library, why is the compiler throwing the following http://stackoverflow.com/questions/8498115/msbuild-is-saying-i-need-a-main-method-for-a-library-compilation exception: CSC : error CS5001: Program 'c:\MvcApplication1\web\bin\MvcApplication1.dll' does not contain a static 'Main' method suitable for an entry point[C:\MvcApplication1\web\MvcApplication1.csproj] Here's the .csproj file:
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 company Business Learn more about hiring developers or posting http://stackoverflow.com/questions/12561052/error-cs5001-exe-does-not-contain-a-static-main-method-suitable-for-an-entry ads with us Stack Overflow 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 vote favorite 1 I have all of a sudden started to receive the following error when trying to compile does not 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, "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 does not contain 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 saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Brow