If I edit a hidden file in Notepad, I can save changes. Editing and then attempting to save that same file in Wordpad causes an "Access to C:...\file.txt" was denied" dialog to pop up.

In my very specific scenario, I'm frustrated that I can't hide my .ReSharper.user files. If I do, the next time I close down Visual Studio, ReSharper complains that it can't save my settings.

Argh! Why are Windows programs inconsistent with being able to write to hidden files? Why does the hidden attribute of a file affect its writability at all?


I am currently able to reproduce the issue in ReSharper v6.0. Issue likely stems from a File.Exists() call not detecting the file when hidden. As such, I've logged a ticket for potential resolution:

RSRP-287503 Error saving solution settings ( ReSharper.user ) if file is hidden

I wouldn't say that Windows programs are inconsistent when working with hidden files, but care must be used when designing software to properly accommodate situations where accessing a hidden file might come into play ( as in this instance with ReSharper )


Have you checked to make sure that your .ReSharper.user files aren't marked as read-only? As far as I can test, Visual Studio 2008 and 2010 can write to hidden files just fine (look for a .suo file next to your solution to check). If you're using version control systems, it'll generally mark the file as read-only while they're checked in. If you are, you've probably included the .ReSharper.user files in with your project and checked them in which would have made them read-only. Check them out or remove them from source control to be able to write to them.

  • Hmm. It must have to do with the way VS saves files versus the way ReSharper does. In the case, VS is acting like Notepad (yay save hidden files) while ReSharper is Wordpad (fail save).
    – xofz
    Jun 23 '10 at 19:48
  • Both have identical access privileges to their files of course, which is why I'm so frustratingly baffled.
    – xofz
    Jun 23 '10 at 19:50
  • Are you using source control? (TFS, SVN, SourceSafe *shudder*)
    – Joshua
    Jun 23 '10 at 19:54
  • Yeah, I'm using Git. *.ReSharper.user is in my .gitignore though. I looked at the file's attributes; read-only was unchecked.
    – xofz
    Jun 23 '10 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.