Custom directory enumeration in .NET Core 2.1

As discussed in my previous post, this post will cover the new enumeration extensibility points. The extensibility API we’re providing is meant to allow building high-performance custom enumerators. The performance gains primarily come through utilizing the new Span types and ref structs to allow relatively safe access to native data, avoiding unnecessary allocations. The API…

0

System.IO in .NET Core 2.1 sneak peek

Now that .NET Core 2.1 Preview 1 has released it is time for a preview of what you can expect to see in Preview 2 and beyond in the System.IO namespace. The 2.1 release changes are the largest changes in quite some time. Goals Cross platform Code should run consistently as possible between platforms. You should…

0

Wildcards in Windows

I put forth the challenge in my last post about how to match files that start, end, or simply have a period in them. It isn’t easy to do. Wildcards in paths seem simple at first. You have ‘?’ to match any single character and ‘*’ to match zero or more of any characters. Matching…

0

Wildcard challenge

Finding files with spaces from a command prompt might not be immediately obvious. Using quotes is the answer. List all files with a space: dir “* *” List all files that start with a space: dir ” *” List all files that end with a space: ??? #3 is a bit more challenging. Normalization has something…

0

Creator’s Update, .NET 4.7 and long paths

Most notable bit is CMD supports long paths now. You still need to enable the long path policy as it isn’t on by default. .NET 4.7 had some minor tweaks. It now allows using device syntax (\\?\) with FileIOPermissions as long as you are running in full trust. This should allow you to use \\?\…

0

.NET 4.6.2 and long paths on Windows 10

The Windows 10 Anniversary update is almost out the door. .NET 4.6.2 is in the update (as we’ve looked at in the past few posts). I’ve talked a bit about what we’ve done in 4.6.2 around paths, and how that is targeted at both allowing access to previously inaccessible paths and opens up the door for…

54

More on new .NET path handling

In my prior post I talked briefly about the new path handling in .NET 4.6.2. In the latest drop (14367) PowerShell opts into both of the new behaviors so you can easily play around with the changes. There are two basic changes that can be controlled via two compatibility switches. The changes both originated in…

20

New .NET path handling sneak peek

As mentioned I’m going to do the On .NET show in a couple weeks to talk about path changes in .NET. In the meantime, a little bit of fun for you if you’ve got the latest (14361) fast ring build for Windows 10 Anniversary Update… UPDATE: In the latest drop (14367) PowerShell opts into the new…

0

Using MSBuild properties in T4 templates

The Problem Text Templates in VS are cool, but they have some rough edges. One in particular is getting at project properties from your templates. One of the biggest problems is that the generator for the project build and the generator that runs inside VS are different. The project build generator will allow you to…

0

VS Background Builds

Two MSBuild related things that I keep losing track of every few years that are incredibly hard to discover. Logging Background Builds Visual Studio does a number of background (or “Design Time”) builds on your behalf. They don’t log anywhere by default. If you want to look at what is going on you need to “set TRACEDESIGNTIME=true”…

0