I have a strange phenomen
I have .Net 4.0 app. When the myapp.exe.config is under the normal programfiles folder it is ignored. Even if I delete it or write nonsense in it the myapp.exe works and it seems to me that values are taken from a previous installation.
When I copy the folder to e.g. to Desktop it works correct.
Edit: when I copy form c:programfiles\myapp\ to c:\programfiles\copy of myapp\ it works It seems to be only a problem in the progamfile folder where a previous installation has benn made. (I guess)
Any ideas?
Best regards
Could you share your operating system with us? I have had similar problems in the past with an application (Win 2008). One simple work arround if you are not the system administrator, is to edit the .config file on another location, and then place it back.
Sometimes the content of a file is not really editted, however a copy is created with your changed on the back, which is confusing.
Most probably you are dealing with a case of "compatibility files" - in your Program Files folder you have a file saved in the Compatibility files view that is being read instead of your actual file.
Delete the compatibility files and everything should work correctly.
In this article, in the "how about the ugly part?" you will find described exactly your scenario.
Best regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With