csc.exe: prevent “does not contain a static ‘Main’ method suitable for an entry point”, use /target:library
Posted by jpluimers on 2016/06/29
Every once in a while I do Command-line Building With csc.exe.
When building libraries, it throws this error:
The reason is that by default it wants to build a program.
Change this default by adding the /target:library parameter.
–jeroen
via: c# – Program does not contain a static ‘Main’ method suitable for an entry point – Stack Overflow.
Like this:
Like Loading...
Related
This entry was posted on 2016/06/29 at 06:00 and is filed under .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Leave a Reply