Hi, could not figure out any thing abnormal from your code.
BTY, what is your deploy method? Click Once or msi?
For both these methods you should consider about whether you have authority to access the folder.
>> "it does not work properly when I deploy the app and change myapp.exe.config"
And how? How does it work improperly? Any exception is thrown? If not please add try...catch block to see if any exception exists, as for file operation, it is always recommended to perform this.
If no response is got, I'd like to suggest that you post your thread in the
Windows Forms General Forum, then I will move your thread into the Off-Topic Forum shortly, Thanks for
your understanding.
Leo Liu [MSFT]
MSDN Community Support |
Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
