Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class Library Error does not contain a static 'Main' method suitable for an entry point

I have two projects that are essentially class library projects. The first (Net.Data.Entities) contains definitions of the entities I use, while the other (Net.Data.DataContexts) contains the data contexts for objects that my application is to use.

The Net.Data.DataContexts project has a reference to the Net.Data.Entities project. When I build my libraries, both of which are set as class libraries in the property section, I get the following error messages:

Error 2 Metadata file 'C:...\XXX\XXXXX\Net.Data.Entities\bin\Debug\Net.Data.Entities.exe' could not be found

Error 1 Program 'c:...\XXX\XXXXX\Net.Data.Entities\obj\Debug\Net.Data.Entities.exe' does not contain a static 'Main' method suitable for an entry point

What exactly does the above mean and how can I resolve this problem?

I am using Visual Studio 2012, on a Windows 7 machine, using Entity Framework 5 and .NET 4.5.

like image 966
Kobojunkie Avatar asked Dec 05 '25 00:12

Kobojunkie


1 Answers

Right click on project select Properties and select Application then change Output Type to Class Library.

like image 64
Mustafa Ekici Avatar answered Dec 06 '25 14:12

Mustafa Ekici



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!