peteraritchie / LongPath

drop-in library to support long paths in .NET
GNU Lesser General Public License v3.0
112 stars 43 forks source link

DirectoryInfo.EnumerateFiles(); is missing #33

Closed FuchsiaSoft closed 8 years ago

FuchsiaSoft commented 8 years ago

In v2.0.0-beta the DirectoryInfo.EnumerateFiles() method is no longer available from an instance of DirectoryInfo class for projects that are .Net 4.5+

This worked fine in v1.3.2 and emulated the behaviour of System.IO returning IEnumerable<FileInfo>

From my testing (using VS 2015 and the nuget prelease) it still works fine in .Net 4.0

peteraritchie commented 8 years ago

Hmm, that's interesting. That wasn't done on purpose. I'll have a look. Thanks.

peteraritchie commented 8 years ago

@FuchsiaSoft when you say 4.5+, are you talking about a project in VS 2015 or 4.5.1 and 4.6?

FuchsiaSoft commented 8 years ago

@peteraritchie I tried it with 4.5 and 4.5.2, both had the issue for me

FuchsiaSoft commented 8 years ago

Also it was in vs 2015

peteraritchie commented 8 years ago

ok, not seeing it in 2013. I'll have to try with 2015 later.

FuchsiaSoft commented 8 years ago

I've tried it in 2013 and have the same issue in 4.5 projects but only from the nuget package.

On downloading the source solution I can add a new project and reference Pri.LongPath internally and it works fine.

I can create a sample repository and post a link if it helps?

peteraritchie commented 8 years ago

Even more interesting. Let me have more of a look and I'll let you know if I need anything else. Thanks

peteraritchie commented 8 years ago

@FuchsiaSoft I tried with a 2013 project for 4.5 and 4.5.1 and I'm not seeing any problems. If you have an 2013 example of the problem, could you please attach a zip to the thread?

FuchsiaSoft commented 8 years ago

Will do... it'll be about 12 hours from now though with time diff

FuchsiaSoft commented 8 years ago

Sorry for the delay I got caught up with something else.

GitHub won't allow me to attach a zip to this thread, so I've put it into a sample repo here: https://github.com/FuchsiaSoft/LongPathTest

Direct link to the repo as a zip here: https://github.com/FuchsiaSoft/LongPathTest/archive/master.zip

It's a console application made in Express 2013 targeting .Net 4.5

Pri.LongPath 2.0 was added from nuget as prerelease to it

peteraritchie commented 8 years ago

Cool, thanks @FuchsiaSoft

peteraritchie commented 8 years ago

Fixed by commit 785f14b2272a43e3036a8563438c683d00ea00b4

peteraritchie commented 8 years ago

It just happened to be a compiler constant not being defined in the Release project. I'm surprised no one noticed it until now :). Thanks.

FuchsiaSoft commented 8 years ago

Thank you very much for your time... I'd worked around it with GetFiles for the project I'm currently working on but glad I don't have to change any others now it's fixed.

Thanks again :smiley: