I have two separate project with NET CORE 6. One project contains all code - Controller, Models and so on. Other projects contains all View. Of course View has reference to code and Inject various data from Model to View. This is output of View (class library) project (with references to Code project).
And this is output of Code project (Console application) with EntryPoint, tuning services in DI container and so on.
Of course, if we try to start Code project without View we will receive, because this project know nothing about View
InvalidOperationException: The view 'Index' was not found. The following locations were searched: /Views/Home/Index.cshtml /Views/Shared/Index.cshtml /Pages/Shared/Index.cshtml
And, of course, if we try to start project with View we will receive
Unable to run your project. The "RunCommand" property is not defined.
Because this project know nothing about Entry Point, tuning services, DI container and so on.
Solution is something close, but I can not understand it, sorry. How is possible to start this web site?