Visual studio code: Program has more than one entry point defined?

心已入冬 提交于 2019-11-29 04:54:04

If both entry points are in the same project, setting the startup project wouldn't do anything anyway. What you need to do is set the startup object. This can be done in the project properties dialog in full VS (look for "Startup object" under Application), or in the .csproj file by setting Project/PropertyGroup/StartupObject:

<StartupObject>Example.Addition</StartupObject>

Alternatively consider using a single Main() entry point which takes a command-line argument.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!