Why does Linqpad say a network directory exists, while . NET does not?

Asked

Viewed 25 times

0

I have a network directory on "\\10.88.0.1\rec". However Directory.Exists returns false while debugging in visual studio. This is strange since the LinqPad returns true.

Are there any differences between the linqpad execution environment for the visual studio execution environment that have an effect on this? How can I configure my application to recognize the network path in the same way that Linqpad recognizes?

  • That’s why I don’t use the Directory.Exists(), This has always been wrong in 99.99% of cases. There is a difference, Linqpad takes care of a lot of things, creates a differentiated execution environment to do what is proposed, but I do not know details and even if this was not just coincidence.

  • @And what should I do then?

  • I have no idea why I do not use it, but anyway the Linqpad should be used only for some quick tests, in production the code should be more robust even.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.