0

Building ASP NET Application I capture the following error:

Error   CS5001  Program does not contain a static 'Main' method suitable for an entry point [ProjectName]   [ProjectPath]\CSC   1   Active

Output type of the project is 'Windows Application'. Default namespace and assembly name match the namespace through the application. And there's just one project in solution.

The whole problem started as soon as I created entities model (based on Northwind), made some relevant changes in controller and called to create a new view. The window I received informed me "There was an error running the selected code generator: 'There was an error getting the type [ProjectName].Models.Category'. Try rebuilding the project". [ProjectName].Models contains public class 'Category'.

I suppose it is just the result of some error, not the error itself.

I changed namespace all over the application not long ago, so I assume this might be the problem and the compiler still requires some changes to be done. But looking through the whole solution I didn't find any notions of the old namespace.

My competency in ASP.NET MVC is far from brilliant, so please any ideas how to check, what I should examine, where I should look through and/or change are welcome.

1 Answer 1

0

Oops, pity me. It should be "Class Library" type instead of "Windows Application". Simple mistake made me triplecheck almost all the application (and a relevant part of similar SO issues).

Sign up to request clarification or add additional context in comments.

1 Comment

Please mark this answer as correct, so another users can skip this answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.