-2

I can't seem to create my WinForms on Visual Studio. Every time I try it keeps saying "Program does not contain a static 'Main' method suitable for an entry point.".

Every time I try to start the applicatio Visual Studio shows that message and I'm trying to find the problem, but I don't know what to do.

What can I do to fix this?

Here is my Program.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace icememe
{
class QuickExecution
{
    public static string printluac =
        @"getglobal print
        pushstring You Clclicked PrintLuaC Button :D!
        pcall 1 0 0
        emptystack";

    public static string printlua =
        @"print'You Clclicked PrintLua Button :)'";

    public static string luacday =
        @"getglobal game
        getfield -1 GetService
        pushvalue -2
        pushstring Lighting
        pcall 2 1 0
        pushstring 12:00:00
        setfield -2 TimeOfDay
        emptystack";

    public static string luacnight =
        @"getglobal game
        getfield -1 GetService
        pushvalue -2
        pushstring Lighting
        pcall 2 1 0
        pushstring 00:00:00
        setfield -2 TimeOfDay
        emptystack";

    public static string luacilluminati =
        @"getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Humanoid
        pushnumber 3.5
        setfield -2 HipHeight
        pcall 1 0 0
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Left Arm
        getfield -1 Destroy
        pushvalue -2
        pcall 1 0 0
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Right Arm
        getfield -1 Destroy
        pushvalue -2
        pcall 1 0 0
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Right Leg
        pushnumber 1
        setfield -2 Transparency
        pcall 1 0 0
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Left Leg
        pushnumber 1
        setfield -2 Transparency
        pcall 1 0 0
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Head
        pushnumber 1
        setfield -2 Transparency
        pcall 1 0 0
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Head
        getfield -1 face
        pushnumber 1
        setfield -2 Transparency
        pcall 1 0 0
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Torso
        getglobal Instance
        getfield -1 new
        pushstring ParticleEmitter
        pushvalue -4
        pcall 2 1 0
        pushstring rbxassetid://362575925
        setfield -2 Texture
        pushnumber 100
        setfield -2 VelocitySpread
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Torso
        getglobal Instance
        getfield -1 new
        pushstring SpecialMesh
        pushvalue -4
        pcall 2 0 0
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Torso
        getfield -1 Mesh
        pushstring rbxassetid://438530093
        setfield -2 MeshId
        pcall 1 0 0
        settop 0
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Torso
        getfield -1 Mesh
        pushstring rbxassetid://438530120
        setfield -2 TextureId
        pcall 1 0 0
        settop 0
        getglobal game
        getfield -1 Lighting
        getglobal Instance
        getfield -1 new
        pushstring Sky
        pushvalue -4
        pcall 2 1 0
        pushstring wow
        setfield -2 Name
        pushstring rbxassetid://259226828
        setfield -2 SkyboxBk
        pushstring rbxassetid://259226828
        setfield -2 SkyboxDn
        pushstring rbxassetid://259226828
        setfield -2 SkyboxFt
        pushstring rbxassetid://259226828
        setfield -2 SkyboxLf
        pushstring rbxassetid://259226828
        setfield -2 SkyboxRt
        pushstring rbxassetid://259226828
        setfield -2 SkyboxUp
        settop 0
        getglobal workspace
        getglobal Instance
        getfield -1 new
        pushstring Sound
        pushvalue -4
        pcall 2 1 0
        pushstring rbxassetid://512338922
        setfield -2 SoundId
        pushstring meme
        setfield -2 Name
        pushnumber 1
        setfield -2 Volume
        getfield -1 Play
        pushvalue -2
        pcall 1 0 0
        settop 0";

    public static string luacdkit =
        @"getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getglobal Instance
        getfield -1 new
        pushstring ForceField
        pushvalue -4
        pcall 2 0 0
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Torso
        getglobal Instance
        getfield -1 new
        pushstring Sparkles
        pushvalue -4
        pcall 2 0 0
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Torso
        getglobal Instance
        getfield -1 new
        pushstring Smoke
        pushvalue -4
        pcall 2 0 0
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Torso
        pushstring Brick
        setfield -2 Material
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Right Arm
        pushstring Brick
        setfield -2 Material
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Left Arm
        pushstring Brick
        setfield -2 Material
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Right Leg
        pushstring Brick
        setfield -2 Material
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Left Leg
        pushstring Brick
        setfield -2 Material
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Character
        getfield -1 Humanoid
        pushnumber 200
        setfield -2 WalkSpeed
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Backpack
        getglobal Instance
        getfield -1 new
        pushstring HopperBin
        pushvalue -4
        pcall 2 1 0
        pushnumber 2
        setfield -2 BinType
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Backpack
        getglobal Instance
        getfield -1 new
        pushstring HopperBin
        pushvalue -4
        pcall 2 1 0
        pushnumber 3
        setfield -2 BinType
        emptystack
        getglobal game
        getfield -1 Players
        getfield -1 LocalPlayer
        getfield -1 Backpack
        getglobal Instance
        getfield -1 new
        pushstring HopperBin
        pushvalue -4
        pcall 2 1 0
        pushnumber 4
        setfield -2 BinType
        emptystack";

    public static string luajp =
        @"game.Players.LocalPlayer.Character.Humanoid.JumpPower = 150";

    public static string luaws =
        @"game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 150";

    public static string luabsod1 =
        @"local a = Instance.new(""Sky"",game.Lighting)
        local b = { ""Bk"", ""Dn"", ""Ft"", ""Lf"", ""Rt"", ""Up"" }
        for _,v in pairs(b) do
        a[""Skybox""..v]=""rbxassetid://111954944""
        end";

    public static string luabsod2 =
        @"local c = 
Instance.new(""ParticleEmitter"",game.Players.LocalPlayer.Character.Torso)
        c.Texture = ""rbxassetid://79187163""
        c.VelocitySpread = 50";

    public static string luabsod3 =
        @"local d = Instance.new(""Sound"",game.workspace)
        d.SoundId = ""rbxassetid://507839176""
        d.Looped = true
        d:Play()";

    public static string luabsod4 =
        @"local dd = 
Instance.new(""ParticleEmitter"",game.Players.LocalPlayer.Character.Torso)
        dd.Texture = ""rbxassetid://357822657""
        dd.VelocitySpread = 50";
}

}

Kevin Glier
  • 1,346
  • 2
  • 14
  • 30
THE FLASH
  • 1
  • 5
  • Please copy and paste us your code so we can help. – Deolus Apr 30 '20 at 19:15
  • Welcome to StackOverflow. In order for people to help you, you need to add some code, related to what's not working. Also you should add more information on what type of solution it is (e.g. console app, WinForms, WPF, ASP.NET, etc). – Jakob Busk Sørensen Apr 30 '20 at 19:15
  • Can you show the code that you have in `Program.cs`? – devNull Apr 30 '20 at 19:15
  • ok let me copy and paste it – THE FLASH Apr 30 '20 at 19:16
  • one sec its taking long – THE FLASH Apr 30 '20 at 19:18
  • 3
    Do [any of the answers to other questions about this same error code answer your question](https://stackoverflow.com/search?q=cs5001+is%3Aq)? – Heretic Monkey Apr 30 '20 at 19:21
  • ok i posted my code below – THE FLASH Apr 30 '20 at 19:21
  • 1
    Don't post it below, that's the section for answers. This isn't a forum structure. Post your code above, in your question. There is an "edit" button to allow you to do this. Thanks. – ADyson Apr 30 '20 at 19:24
  • one sec my thing is taking to long it says add more details – THE FLASH Apr 30 '20 at 19:27
  • ok I edited it. – THE FLASH Apr 30 '20 at 19:29
  • Does this answer your question? [Error message "CS5001 Program does not contain a static 'Main' method suitable for an entry point"](https://stackoverflow.com/questions/47588531/error-message-cs5001-program-does-not-contain-a-static-main-method-suitable-f) – Jay Apr 30 '20 at 19:41
  • 1
    Your program contains no logic; it's just a bunch of `string` fields. What did you expect to happen when you ran it? The Windows Forms project template in Visual Studio contains a program stub that launches your `Form`. What happened to that code? – Lance U. Matthews Apr 30 '20 at 19:46
  • What are you expecting your program to *do* if it doesn't have a `Main` method? Are you just wanting to provide these strings as something other C# code can use? Are you making a plugin? – Joe Sewell Apr 30 '20 at 19:46

1 Answers1

2

You'l want to add

static public void Main() {

}

This is where execution will begin in your program and you can put your logic in this function

Jay
  • 2,553
  • 3
  • 17
  • 37