[英]error CS0111: Type 'Program' already defines a member called 'Main with the same parameter types c#
The error is for tempCodeRunnerFile.cs.错误是针对 tempCodeRunnerFile.cs。 It must have
Main
.它必须有
Main
。 Program.cs already does. Program.cs 已经做到了。 And they both seem to be in same project.
而且他们似乎都在同一个项目中。 It would make sense.
这是有道理的。 I get error even in VS 2019 if two files have Main() in the same project.
如果两个文件在同一个项目中具有 Main(),即使在 VS 2019 中我也会出错。
Based on update by OP Please remove One of the Main
or include only one file in csproj.基于 OP 的更新,请删除
Main
文件之一或仅在 csproj 中包含一个文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.