.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: NotesAPI.dll NotesAPI.pdb In this article, I’ll … Read more

Class Diagrams missing in Visual Studio 2019

Problem The Class Diagram item is missing in Visual Studio 2019. Solution For some reason this is not installed by default in Visual Studio 2019, so we simply need to install it. 1. In Visual Studio click Tools > Get Tools and Features… 2. Close Visual Studio. 3. In Visual Studio Installer: Click Individual components … Read more

Visual Studio 2019 – All references say referenced component could not be found

Problem When I open a C# project in Visual Studio 2019, none of the references are loading. In the error list it says: The referenced component could not be found This usually means you need to restore the Nuget Package. In this case, it’s even showing this for .NET Framework references – such as System.Core. … Read more