I tried and successfully reproduced this issue. As the error message shows and described in this document, if you want to avoid this error, you need to build the project by calling MsBuild.exe from the Visual Studio Developer Command Prompt: msbuild xxx.sln /p:Configuration=Debug
, because this task is not supported on the .NET Core version of MSBuild. Or you can change the target framework of your project to .NET Framework. If you don't want to do this, you may need to look for some third-party tools to meet your needs.