none
Upgrading to 4.6.2 fails File.Exists check RRS feed

  • Question

  • I upgraded my .NET project from 4.5.1 to 4.6.2. Whenever I am doing a System.IO.File.Exists check, it always returns false even though the file does exist. When I change my httpruntime in the web.config to any version lower than 4.6.2, the File.Exists works fine. Has anybody come across this scenario. Why does changing .net version to 4.6.2 not identify if a file exists or not. 
    Wednesday, April 18, 2018 4:59 PM

All replies

  • Hi,

    Welcome to MSDN forum.

    Where is your file location?

    >>When I change my httpruntime in the web.config to any version lower than 4.6.2, the File.Exists works fine.

    The main purpose of runtime target framework is for compatibility. Some breaking change may be introduced in the new version of asp.net. In order not to break the existing application, the breaking change is quirked through the target framework.

    Did you get any error message when you upgraded my .NET project from 4.5.1 to 4.6.2?

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 19, 2018 10:30 AM