At work, I have a fairly old web app that runs on Web Forms. It's written in VB .NET.
I am trying to move away from VB.NET as the main language for obvious reasons, so I have started another project in the solution with MVC and C# as the language.
I can't just add MVC to the same project because I can't mix languages in the same project (and even if I could I'm not sure I would want to). My plan is to have the main web project depend on the MVC project, but at launch, have the main project bootstrap the MVC stuff, set up the routes, and route any "not found" route in the MVC project into the Web Forms project.
I know I can compile my Razor views into code, but this means when I make changes in the views and save them as the app is running, these changes aren't reflected on the running web service. I have to rebuild to see changes which I don't want to do over and over again.
Based on this, I seem to be required to create a new view locator for the view engine, and then specify where to look for the views. The only issue is that the new MVC project runs in a folder next to the main project, so I can't use a relative path that goes beyond the root of the original project (If I'm in the old project, I can't just make the view location ~/../../newProject/Views/{1}/Partials/{0}.cshtml because this goes above the root for the old project)
So, how can I create a view locator that will locate the views in a seperate project?