Advertisement · 728 × 90

Posts by Andrew Lock "Sock"

Preview
I’m moving to chrisnas.github.io For easier access, I’ve decided to move my blog to github pages at https://chrisnas.github.io/.

I'm moving from Medium to Github pages!
chnasarre.medium.com/aa972d9ff6c6...

1 hour ago 2 1 0 0
Preview
Running AI agents with customized templates using docker sandbox In this post I describe how to create custom templates for Docker Sandboxes, so that your sandboxes start with additional tools immediately available

Blogged: Running AI agents with customized templates using docker sandbox

andrewlock.net/running-ai-a...

In this post I describe how to create custom templates for Docker Sandboxes, so that your sandboxes start with additional tools immediately available (like .NET)

#docker #dotnet

6 days ago 4 2 0 0
Preview
Running AI agents safely in a microVM using docker sandbox In this post I show how to run AI coding agents safely while still using YOLO/dangerous mode using docker sandboxes and the sbx tool

Blogged: Running AI agents safely in a microVM using docker sandbox

andrewlock.net/running-ai-a...

In this post I show how to run AI coding agents safely while still using YOLO/dangerous mode using docker sandboxes and the sbx tool

#ai #docker #sandbox #claude

1 week ago 10 2 4 0
Preview
.NET R&D Digest (March, 2026) This issue includes bits (or I would rather say bytes) of AI, bits of software development, operating systems, web, diagnostics, performance, C++, C#,  and of course .NET and .NET Internals.

New issue of .NET R&D Digest is here! Thx to
@simonwillison.net, @birgitta410.bsky.social, @kief.com, @lemire.bsky.social, @kevingosse.net, @andrewlock.bsky.social, @meziantou.net, @stevesanderson.bsky.social & other authors for their g8 content!

#dotnet

olegkarasik.wordpress.com/2026/04/03/n...

2 weeks ago 7 3 0 0
Preview
Configuring contextual options with Microsoft.Extensions.Options.Contextual In this post I take a brief look at the Microsoft.Extensions.Options.Contextual package to understand what it's for, how to use it, and whether to use it or not

Blogged: Configuring contextual options with Microsoft.Extensions.Options.Contextual

andrewlock.net/configuring-...

In this post I take a brief look at the Microsoft.Extensions.Options.Contextual package to understand what it's for, how to use it, and discuss whether to use it or not

#dotnet

2 weeks ago 5 1 0 0
screenshot of the main page of File Pilot project website at https://filepilot.tech/

screenshot of the main page of File Pilot project website at https://filepilot.tech/

I can hardly believe that (finally!) there is a great file explorer alternative for those of us who have to stick with windows -- File Pilot is absolutely sleek and marvelous 😍
🔗 filepilot.tech
ht @andrewlock.bsky.social (andrewlock.net/windows-expl...)

3 weeks ago 6 1 0 0

Yeah, I expect it's the same issue tbh, but honestly, I just don't have the strength to fight with it these days 😅 I can watch the videos on demand, but Teams is just inaccessible to me now. Again. 😅 ah well

3 weeks ago 0 0 1 0
Post image

Classic

3 weeks ago 0 0 2 0

Hopefully you'll have more luck than me 😅

3 weeks ago 0 1 1 0
Advertisement

Ah good, another virtual MVP Summit and because Microsoft Teams is terrible, I can't watch any of it. Classic 🙄

3 weeks ago 5 0 2 0
Preview
Announcing Polecat: Event Sourcing with SQL Server Polecat is now completely supported by JasperFx Software and automatically part of any existing and future support agreements through our existing plans. Polecat was released as 1.0 this past week …

Announcing Polecat: Event Sourcing with SQL Server jeremydmiller.com/2026/03/22/a...

I'll happily take any RTs please and thank you!

#polecat #critterstack #sqlserver

4 weeks ago 11 11 1 4
Preview
A First Look at Duende User Management | Duende Join us March 24 for a first look at Duende User Management. Learn to replace ASP.NET Identity with built-in Passkeys, MFA, and audits.

Want the power of Duende IdentityServer but with faster time-to-value? ⏱️ We’re previewing a first-party user management .NET SDK on March 24th that gives you Passkeys, MFA, and audit trails out-of-the-box. Keep your data control, ditch the custom coding.

RSVP: duende.link/78q3hk

#dotnet #aspnet

1 month ago 3 3 0 0
Preview
Writing a .NET Garbage Collector in C#  - Part 9: Frozen segments and new allocation strategy Using NativeAOT to write a .NET GC in C#. In this part, we look at what the GC must do to properly handle frozen segments, and we change the allocation strategy to make it more efficient.

Have you ever noticed that a simple .NET Core applications on 64-bit uses more than 2TB of virtual memory?

In a new episode of the series "writing a .NET garbage collector in C#", we discover the kind of problem that it intends to solve: minidump.net/writing-a-ne...

1 month ago 64 5 3 3

That seems to suggest that this library actually shouldn't be required in MVC at least, as long as you're using IStringLocalizer😅 Need to refresh my memory though...

1 month ago 0 0 1 0
Preview
Localising the DisplayAttribute in ASP.NET Core 1.1 In this post, I recap localisation in ASP.NET Core, and see how localising the DisplayAttribute changed in ASP.NET Core 1.1. Spoiler alert - it just works!

I'm sure DI was part of it, but I think IStringLocalizer was primarily meant to be "lower overhead" because the "key" can just be the actual phrase: e.g. "This field is required".

However, I also just discovered this post I wrote 9 years ago 😅
andrewlock.net/localising-t...

1 month ago 0 0 1 0

@damienbod.com, @rufer.be, is this really how you're out there doing localization on MVC/Razor/Blazer apps?! 😅

1 month ago 1 0 2 0
Preview
#dotnet #csharp #opensource #staffengineer #softwareengineering #consulting | 👨‍💻 Patrik Svensson 🚀 I’m wrapping up my current engagement soon and starting to look for my next technical challenge. I’ll be available again starting April 10. A bit about me: • 20+ years of experience building and d...

I wrote something on LinkedIn: www.linkedin.com/posts/psvens...

I'm looking for a new gig and/or employment (if interesting enough). Please repost if you can! Much appreciated!

1 month ago 17 16 1 0
Preview
GitHub - mrpmorris/AutoLocalize: Automatically localize DataAnnotations validation attributes in .NET Automatically localize DataAnnotations validation attributes in .NET - mrpmorris/AutoLocalize

This looks like a nice clean solution to a wart on .NET's localization functionality - using Fody to set a default ErrorMessageResourceType and ErrorMessageResourceName (based on the attribute type).

github.com/mrpmorris/Au...

Seems crazy that this is necessary though - am I missing something?!

1 month ago 5 2 3 0
Advertisement
Preview
Splitting the NetEscapades.EnumGenerators packages: the road to a stable release In this post I describe the recent architectural changes to the NetEscapades.EnumGenerators package, which is now a metapackage, to support more scenarios

Blogged: Splitting the NetEscapades.EnumGenerators packages: the road to a stable release

andrewlock.net/splitting-th...

In this post I describe the recent architectural changes to the NetEscapades.EnumGenerators package, which is now a metapackage, to support more scenarios

#dotnet

1 month ago 3 0 0 0
Preview
Recording metrics in-process using MeterListener: System.Diagnostics.Metrics APIs - Part 4 In this post I show how you can use MeterListener to listen to Instrument measurements, how to trigger Observable measurements, and how to aggregate values.

Blogged: Recording metrics in-process using MeterListener

andrewlock.net/recording-me...

In this post I show how you can use MeterListener to listen to Instrument measurements, how to trigger Observable measurements, and how to aggregate values

#dotnet #observability

1 month ago 5 2 0 0
Preview
Too good to be true: an unexpected profiler trap Sometimes the most convincing performance gains deserve a second look. A reminder that profiling data can be more subtle than it first appears.

I got "tricked" by PerfView when using it to measure the effectiveness of my optimizations, so I decided to write about it: minidump.net/an-unexpecte...
It's not specific to PerfView though, in theory this could happen with any profiler.

2 months ago 8 5 1 0

Ok, so I wrote a very long and kinda personal thing about existential dread and the end of programming, and I'm not really sure I want to endure the discourse, but if you want to read it, it's here - gist.github.com/davidwhitney...

It's like 6,000 words long, sorry.

2 months ago 29 9 10 4

Thanks!

2 months ago 1 0 0 0
Preview
Creating standard and "observable" instruments: System.Diagnostics.Metrics APIs - Part 3 In this post I discuss the various Instrument<T> types exposed by the System.Diagnostics.Metrics API and show examples from the .NET libraries and ASP.NET Core

Blogged: Creating standard and "observable" instruments

andrewlock.net/creating-sta...

In this post I discuss the various Instrument<T> types exposed by the System.Diagnostics.Metrics API and show examples from the .NET libraries and ASP.NET Core

#dotnet #observability

2 months ago 5 2 1 0
Preview
Add application security to the swiyu generic management verifier APIs using OAuth The article looks at implementing security using OAuth for the swiyu Public Beta Trust Infrastructure generic containers. The container provides endpoint for OpenID verification and the management …

Blogged: Add application security to the swiyu generic management verifier APIs using OAuth

damienbod.com/2026/02/16/a...

#aspnetcore #oauth #swiyu #swiss #openid #yarp #aspire #container #api #iam #security #dotnet

2 months ago 1 1 0 0
Advertisement
Scrolling list of ASP.NET log output

Scrolling list of ASP.NET log output

Show all the routes of a site

Show all the routes of a site

Show all the configuration values for an ASP.NET site and their source

Show all the configuration values for an ASP.NET site and their source

Shows the DI configuration

Shows the DI configuration

If you didn't catch it, this shows the current logs, DI config, environment and ASP.NET routes in the terminal when you do a dotnet run on an ASP.NET app. Combines a bunch of snippets I've borrowed from @meziantou.net and @andrewlock.bsky.social posts and dumping them into the console.

2 months ago 4 1 1 0

In this case "better" is just "more like the original source" ☺️ e.g. dotpeek has two nested for loops like the original, where ilspy has a for and a while.

ILSpy pita the label in the right place though 😅

2 months ago 0 0 0 0
Preview
Exploring the (underwhelming) System.Diagnostics.Metrics source generators: System.Diagnostics.Metrics APIs - Part 2 In this post I explore the source generators shipped in Microsoft.Extensions.Telemetry.Abstractions, explore the code, and discuss whether I would use them

Blogged: Exploring the (underwhelming) System.Diagnostics.Metrics source generators

andrewlock.net/creating-str...

In this post I explore the source generators shipped in Microsoft.Extensions.Telemetry.Abstractions, explore the code, and discuss whether I would use them

#dotnet

2 months ago 7 0 0 0

And thanks to friends in high places (cough @kevingosse.net):

youtrack.jetbrains.com/issue/DOTP-8...

2 months ago 3 0 0 0
The source code for MemoryExtensions.TrimEnd, showing the 'Next' label after the break

The source code for MemoryExtensions.TrimEnd, showing the 'Next' label after the break

The source code for the ILSpy-decompiled version, which uses an inner while loop, but contains the IL_0044 (Next) label at the right place

The source code for the ILSpy-decompiled version, which uses an inner while loop, but contains the IL_0044 (Next) label at the right place

The source code for the dotPeek-decompiled version, which uses an inner while loop, but contains the label_8 (Next) label in the _wrong_ place

The source code for the dotPeek-decompiled version, which uses an inner while loop, but contains the label_8 (Next) label in the _wrong_ place

We discovered something interesting... the decompiled output of ILSpy and dotPeek differs. Which is fine...dotPeek does a "better" job in general... except that in this case, the dotPeek code includes an infinite loop bug 😅

1) Original source for MemoryExtensions.TrimEnd()
2) ILSpy
3) dotPeek

2 months ago 5 0 2 0