Closed AlexGirardDev closed 5 months ago
the other solution to this would have been to make this ignore file name casing when looking for files but just updating the view name seemed simpler
I checked the other files, and I see that _layout.liquid
is referenced using _Layout
, so it shouldn't work either. Can you confirm?
I kind of like the PascalCasing of files, if you do too then let's use that solution instead. If you don't then I'll agree with your changes.
good point, i just checked and layout is'nt being loaded at all because the viewstart is not being loaded. its file name is coming from here which seems to be used by the renderer so i wonder if its just easier to proper case all the luiqud files
Looks like we have to then, good catch.
I wonder is ASP.NET is also forcing Viewstart files to follow this case on Linux.
i was curious and it just seemms like there file names are just completly case insensitive ASP.NET
i just started renaming these and everything worked as expected
they all did start as proper case though
I assume you tried this on Linux? (I would think so since this is how you found about this issue)
Ya, everything has been on linux with Rider.
I think views and more specfically _ViewStart being case sensitive could catch some people off gaurd and may be worth calling out in the docs. Especially if they are developing on windows and then deploying to linux through docker (which is pretty common nowadays i believe).
The test i did with ASP.NET was with compiled templates so i'm assuming this is how they get around the case sensitivity thing, they can just load all there templates into memory and access they view names while ignoring case through managed c# code.
But if your loading the files from disk at runtime, I think its tricker beacuse the native OS calls on a case sesenitve system won't let you access a file while ignoring case.
I was googling around a bit and found this issue on the dotnet runtime that is tangentually related https://github.com/dotnet/runtime/issues/91250
fix for #625