I have two projects in my solution. One (main) of them is the application entry point. The other one (api) handles one of the business processes, which require JSON communication in 99% cases. However, for 1% of cases I need full HTML response, and here is the problem. I created a controller and a view, but it seems that application looks for the view in the main project.
I want it to work with the following file structure within the solution:
/Main/ (and the content of main application)
/API/Controllers/TestController.cs (contains definition of Action())
/API/Views/Test/Action.cshtml
But it seems I need to copy the view from /API/Views/Test/Action.cshtml
to /Main/Views/Test/Action.cshtml
or /Main/Views/Shared/Action.cshtml
. That splits internal logic of my application :(