0

I have a Solution I'm building in C# that has projects A, B, and C, each of which contains a .cs file describing an object with a number of properties and a default constructor which sets the value of each property to some default value. I then have a number of other projects in the solution which use these objects, and so they each have references to A, B, and C so that they are able to use the objects defined by those projects.

When I try to compile, I first get the following error for each project when trying to build A, B, and C:

error CS5001: Program does not contain a static 'Main' method suitable for an entry point

Then, for each project that depends on A, B, and C, I get the following sequence of errors:

error CS0006: Metadata file 'C:\Users\...\A\bin\Debug\A.exe' could not be found
error CS0006: Metadata file 'C:\Users\...\B\bin\Debug\B.exe' could not be found
error CS0006: Metadata file 'C:\Users\...\C\bin\Debug\C.exe' could not be found

The start project for the solution is set to the GUI project that depends on A, B, and C. I cannot figure out why the compiler is attempting to create .exe files for A, B, and C, and why it wants to use those .exe files when building the other projects. Any insight would be appreciated, thank you.

E. Johnson
  • 19
  • 2
  • Change the output type to Class Library in the projects' properties. – Blorgbeard Nov 18 '17 at 03:05
  • This was the problem, thanks Blorgbeard! – E. Johnson Nov 18 '17 at 03:12
  • Another problem is you have not tried to search for error message... Please consider this to be valuable insight and use search engine to look for error message first (Google/Bing would do, try to avoid www.disney.com looking for programming questions) – Alexei Levenkov Nov 18 '17 at 03:41

0 Answers0