Any way to detect case-sensitve file names errors?

we are doing a project to run in ASP.Net on Mono / * nix

Our problem is that we are developing Windows, and we just build and test it so often on Mono. So lately we have had a lot of problems with case sensitive file names. Everything seems to work fine on Windows, and then we go to Mono and it quietly crashes. (As in, it builds, but does not start, or parts of it do not work)

How would you recommend that I discover this during development on Windows? Basically, how do we make case-sensitive file names look wrong in our code, where the code works on Windows but not * nix?

+4
source share
2 answers

One thing you can do is use MONO_IOMAP so that Mono automatically corrects errors and emulates a case-insensitive file system:

http://www.mono-project.com/IOMap

Another thing you can use to actually troubleshoot is the new β€œprofiler module”, which registers every time the line launches MONO_IOMAP and tells you where it was created in your code:

http://twistedcode.net/blog/post/2009/12/21/A-utility-to-help-porting-Windows-NET-applications-to-MonoUnix.aspx

+7
source

You can use the compiler directive, which indicates when you create for * nix systems that will check file paths.

0
source

Source: https://habr.com/ru/post/1299012/


All Articles