I am porting projects in Visual Studio from .NET Framework 4.X to .NET 6.0, and was helpfully told by the compiler that some functions have moved around, for example System.Drawing.Bitmap is now within System.Drawing.Common, and SystemEvents.DisplaySettingsChanged is now within Microsoft.Win32.SystemEvents - which aren't within the core framework.
I used NuGet to install these (as they weren't within the COM list in Reference Manager). The project builds, everything is targeting .NET 6.0, but I get runtime errors of, e.g.:
System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.'
I found another semi-similar post suggesting adding <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
to the .csproj file, but this hasn't worked either - the .dlls are added to bin\Debug\net6.0\ folder where the .exe is, but still aren't recognised during execution.
What am I missing here?