Since you mention it in your previous question, using NotepadPlusPlusPluginPack.Net's latest release and trying to build what's generated by its project template in VS 2022 yields MSB4181 for the task DllExportTask.
Does anybody know how to alter my Demo plugin C# project in order to avoid this error message?
This task's failure is what causes this error message when you try to open Notepad++ with your plugin.
If you look at the msbuild output when DllExportTask is processed, you can see the cause of the task's failure:
Cannot find lib.exe in 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\\..\..\VC\bin'
To fix this, you can copy the contents of C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64
to where visual studio expects it to be (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\bin
).
Now you can just rebuild your project, make sure your DLL in the plugins
folder has been updated by the build, reboot Notepad++ and the error message will no longer appear and your plugin will be properly loaded.