Andy Zivkovic's blog

Multiple git configs

I recently set up a new machine, and it took me longer than I had hoped to get my dual work-personal configs working again. This blog post can be a reminder to myself so in the future I'll be able to find it much more quickly. The solution is to use conditional includes, as documented on git-scm.com. This lets me configure my email address as my work email for any git repo under one directory, and my email address as my personal email for any git repo cloned under a different directory, without having to set per-repo config every time I clone. It can also be used for any config, not just email, but that's all I use it for.

Read more...

C# Top Level Program With Any Target Framework

Starting with .NET 6, dotnet new console will create a project with a "top level program" and implicit usings. If you're like me and want or need to frequently test projects using different target frameworks, it's no longer possible to change the <TargetFramework> version. While it's possible to use dotnet new console -f net5.0 to get the older .NET 5 new console app template, I really like top level projects and implicit usings for quick test programs.

Read more...

Visual Studio Developer Powershell On Demand

In this post I tell my story about how I use Visual Studio's Developer PowerShell in Windows Terminal, and how it evolved to having a custom function, Start-DeveloperPowerShell, to enter this environment from whatever PowerShell environment I'm currently in.

Read more...