.NET – Copy files to a specified directory after the build

The simplest way to copy files post-build in a .NET project is to use the MSBuild Copy Task in the .csproj file, like this: Note: I’m using VS2019. My project is called NotesAPI. When I build, it logs the following messages: It copied the following build files into C:\Build\NotesAPI: In this article, I’ll explain the … Read more

How to add User Secrets in a .NET Core console app

The User Secrets feature in .NET is a safe, simple way to override values in appsettings.json. The overridden values only exist in a file sitting in your own dev environment, so you don’t accidently commit them to your source control repository. This feature is enabled in ASP.NET by default, and the framework does most of … Read more