Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Case sensitive filesystems and Razor view searches #1736

Closed
callumj opened this issue Dec 20, 2014 · 5 comments
Closed

Case sensitive filesystems and Razor view searches #1736

callumj opened this issue Dec 20, 2014 · 5 comments
Assignees
Milestone

Comments

@callumj
Copy link

callumj commented Dec 20, 2014

Title

When using a case sensitive file system the Razor View Engine will be unable to find the controller's view folder unless the path matches case in the directory structure.

Functional impact

Marginal, just requires that developers ensure the use of controller names in paths matches the same case as the directory structure.

Minimal repro steps

  1. Deploy a MVC application on a case sensitive file system (Mono on Linux) Example app used: https://github.com/callumj/vnext-mvc-sample
  2. Create a controller with a view such as HomeController#Create, this should have a view Home/Create.cshtml
  3. Navigate to /home/Create
  4. MVC will be unable to locate Home/Create.cshtml because it has been told to try home/Create.cshtml.

Expected result

It should locate the view irregardless of the case.

Actual result

View not found

@pranavkm
Copy link
Contributor

👍 We were discussing this earlier today. We use the Route dictionary in the ViewEngine to locate components. Instead we should rely on the ActionDescriptor to provide us values for Controller and Area.

@callumj
Copy link
Author

callumj commented Dec 20, 2014

That sounds like a good solution, especially as it places a tighter binding between the Controller and the View engine with the Action able to dictate what View will be used (as opposed to it being inferred by the route).

@yishaigalatzer yishaigalatzer modified the milestone: 6.0.0-rc1 Jan 9, 2015
@yishaigalatzer
Copy link
Contributor

We should consider the following things as well when fixing this:

  1. Controller
  2. Action
  3. Area
  4. View Expander sample

@danroth27 danroth27 added the bug label Jan 9, 2015
@danroth27 danroth27 added this to the 6.0.0-rc1 milestone Jan 9, 2015
@markrendle
Copy link

This is not "marginal", it's literally the first thing I ran into working under Linux and it's really annoying. I lost an hour chasing it down.

@pranavkm
Copy link
Contributor

Fixed in 54c1fed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants