“Compile with /main to specify the type that contains the entry point.”

前端 未结 4 742
不思量自难忘°
不思量自难忘° 2021-02-08 06:20

Per the code below, I am getting the following message. I am fairly certain \"why\" I am getting it, I just don\'t know how to rearrange the code to move/remove/replace one of t

4条回答
  •  你的背包
    2021-02-08 06:55

    The compiler is complaining that it cannot find the type that implements the application entry point (i.e. the Main method), possibly because you have more than one type in your assembly with a compatible Main method.

    One way to resolve this would be to use the /main option, as in /main:Form1. Of course, if the problem is that more than one Main method exists then the better solution would be to simply remove the ones that you do not intend to use.

提交回复
热议问题