How can I solve the problem with long paths under .Net 4.8? | SoloLearn: Learn to code for FREE!

0

How can I solve the problem with long paths under .Net 4.8?

It didn't work, as I wanted to load a xml document from the local hard disk with a long path? Any Idee?

5/7/2019 9:15:28 PM

Semicolon

2 Answers

New Answer

+3

That's a really annoying problem. What I usually do is assign a new drive letter to that directory. You can do it in the command prompt: SUBST X: "C:\some\deep\folder\structure" And then You can use `X:` like you would use `C:`. Of course, if your path is 600+ characters long, you have to `SUBST` twice. If your filenames are 250+ characters long then this doesn't work at all and you are screwed because windows explorer can't handle it either.

+2

You may find it helpful: https://stackoverflow.com/questions/5188527/how-to-deal-with-files-with-a-name-longer-than-259-characters For tests you can put xml file in project directory, and then worry about long path handling when you're sure, your program works well ^^