1

We are separating our front end from our back end (C#.NET MVC) so that back-end dev does not block front-end. Instead of a zillion local database updates, I'll be hitting an API.

I've been working in VS up till now, but wish to work in another editor, and be able launch the front-end in a browser directly.

Except that the index page is index.cshtml. There's nothing of note in the index file that requires it to be cshtml, so I could convert it to .html - the only problem is, now launching the app in VS fails because it is only looking for a cshtml file to start, i.e.:

The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
etc.

My question is: what can I do to modify index.cshtml or the server, so that I can load the app in a browser without having to run it through Visual Studio?

This is the current structure in VS, most of which I hope to dispense with:

App.Data.EntityFramework
App.Data.Sql
App.Domain
App.DomainEntities
App.Presentation.Web
    App_Data
    App_Start
    Areas
    Content
        CSS
        js
            apps
            dashboard
                controllers
                views << dashboard files
            store  << 90% of my files are here
                controllers
                views
                services
                etc.
    Controllers
    ControllersApi
    Models
    Providers
    Results
    Views
        Home
            index.cshtml << actual start page

This is where I go to start the app:

https://localhost:44337/#/dashboard

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
DaveC426913
  • 2,012
  • 6
  • 35
  • 63
  • Possible duplicate of [Using Html instead of csHtml](http://stackoverflow.com/questions/18046247/using-html-instead-of-cshtml) – B.K. Jun 27 '16 at 15:56
  • That other thread doesn't do much for freeing a site from its C# roots. – DaveC426913 Jun 28 '16 at 14:18
  • This is what I'm trying to do: http://stackoverflow.com/questions/24146465/visual-studio-convert-web-application-to-website though it is incomplete. – DaveC426913 Jun 28 '16 at 14:36

0 Answers0