EDN Admin
Well-known member
I keep getting the following from code generated by VS2005:
DocumentsVisual Studio 2005ProjectsBegCSharpDbChapter2_ExamplesChapter2_ExamplesobjDebugChapter2_Examples.exe does not contain a static Main method suitable for an entry point Chapter2_Examples
Please see the code below: <font color="#0000ff" size=2>
using</font><font size=2> System; </font><font color="#0000ff" size=2>
using</font><font size=2> System.Collections.Generic; </font><font color="#0000ff" size=2>
using</font><font size=2> System.Windows.Forms; </font><font color="#0000ff" size=2>
namespace</font><font size=2> Employees
{
</font><font color="#0000ff" size=2>static</font><font size=2> </font><font color="#0000ff" size=2>class</font><font size=2> </font><font color="#008080" size=2>Program </font><font size=2>
{
</font><font color="#808080" size=2>///</font><font color="#008000" size=2> </font><font color="#808080" size=2><summary> </font><font size=2>
</font><font color="#808080" size=2>///</font><font color="#008000" size=2> The main entry point for the application. </font><font size=2>
</font><font color="#808080" size=2>///</font><font color="#008000" size=2> </font><font color="#808080" size=2></summary> </font><font size=2>
[</font><font color="#008080" size=2>STAThread</font><font size=2>]
</font><font color="#0000ff" size=2>static</font><font size=2> </font><font color="#0000ff" size=2>void</font><font size=2> Main()
{
</font><font color="#008080" size=2>Application</font><font size=2>.EnableVisualStyles();
</font><font color="#008080" size=2>Application</font><font size=2>.SetCompatibleTextRenderingDefault(</font><font color="#0000ff" size=2>false</font><font size=2>);
</font><font color="#008080" size=2>Application</font><font size=2>.Run(</font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>Form1</font><font size=2>());
}
}
}
</font>How do I resolve this?
Incidentally, the braces are in their correct positions in the original code - they just look wrong here.
Ruel
View the full article
DocumentsVisual Studio 2005ProjectsBegCSharpDbChapter2_ExamplesChapter2_ExamplesobjDebugChapter2_Examples.exe does not contain a static Main method suitable for an entry point Chapter2_Examples
Please see the code below: <font color="#0000ff" size=2>
using</font><font size=2> System; </font><font color="#0000ff" size=2>
using</font><font size=2> System.Collections.Generic; </font><font color="#0000ff" size=2>
using</font><font size=2> System.Windows.Forms; </font><font color="#0000ff" size=2>
namespace</font><font size=2> Employees
{
</font><font color="#0000ff" size=2>static</font><font size=2> </font><font color="#0000ff" size=2>class</font><font size=2> </font><font color="#008080" size=2>Program </font><font size=2>
{
</font><font color="#808080" size=2>///</font><font color="#008000" size=2> </font><font color="#808080" size=2><summary> </font><font size=2>
</font><font color="#808080" size=2>///</font><font color="#008000" size=2> The main entry point for the application. </font><font size=2>
</font><font color="#808080" size=2>///</font><font color="#008000" size=2> </font><font color="#808080" size=2></summary> </font><font size=2>
[</font><font color="#008080" size=2>STAThread</font><font size=2>]
</font><font color="#0000ff" size=2>static</font><font size=2> </font><font color="#0000ff" size=2>void</font><font size=2> Main()
{
</font><font color="#008080" size=2>Application</font><font size=2>.EnableVisualStyles();
</font><font color="#008080" size=2>Application</font><font size=2>.SetCompatibleTextRenderingDefault(</font><font color="#0000ff" size=2>false</font><font size=2>);
</font><font color="#008080" size=2>Application</font><font size=2>.Run(</font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>Form1</font><font size=2>());
}
}
}
</font>How do I resolve this?
Incidentally, the braces are in their correct positions in the original code - they just look wrong here.
Ruel
View the full article