skip to content
Relatively General .NET

File paths in a Roslyn analyzer or source generator

by Gérald Barré

posted on: October 30, 2023

In Roslyn, a SyntaxTree represents the content of a source file. If you need to know the source file that created this SyntaxTree, you can use the FilePath property. This property represents the file path on the disk. But, the file path on the disk may not be what you want.On CI, you should use rep

Customizing the behavior of record copy constructors

by Gérald Barré

posted on: October 23, 2023

When you use a record. you can create a new instance by using the new keyword. Or you can copy an instance with some modifications using with expression (non-destructive mutation). The with expression copy all fields from the original instance and then apply the modifications.C#copyvar john = new S

Principles of Lean Software Development

by Ardalis

posted on: October 20, 2023

Lean Software Development is an agile project management and product development framework that originated from Lean manufacturing…Keep Reading →

.NET Rocks: Data Sharding with Oren Eini

by Oren Eini

posted on: October 19, 2023

You can listen to me talk to Carl & Richard on RavenDB Sharding here.What is data sharding, and why do you need it? Carl and Richard talk to Oren Eini about his latest work on RavenDB, including the new data sharding feature. Oren talks about the power of sharding a database across multiple servers to improve performance on massive data sets. While a sharded database is typically in a single data center, it is possible to distribute the shards across multiple locations. The conversation explores the advantages and disadvantages of the different approaches, including that you might not need it today, but it's great to know it's there when you do!This episode was recorded a while ago, and just went live.

Customizing the name of embedded resources in .NET

by Gérald Barré

posted on: October 16, 2023

When you use embedded resources in a .NET project, the resource name is computed from the path of the file. By default, it uses a format similar to <Assembly Name>.<File Path>. But the file path doesn't contain a path separator (/ or \). Instead, the path separator is replaced by a dot