Problem with building XML using content pipeline

I’m using Monogame extended and having trouble creating objects in XML using a class library reference.
From following guides online and other posts in the forum, these are the steps I take:

-Create a new class library “ClassLibrary1”
-Create a public class in library “Dog”
-Create new XML content file using the content pipeline
-Edit the XML via Visual Studio 2019
-Set the “Asset” node type value to “ClassLibrary1.Dog”
-Then add a reference to the class library in the pipeline.

namespace ClassLibrary1
    public class Dog

<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:ns="Microsoft.Xna.Framework">
  <Asset Type="ClassLibrary1.Dog">

However when I try to build this I get these errors:

The command ““C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe” /quiet /platform:Windows /@:“M:\Documents\Visual Studio 2019\[Project]\Content.mgcb” /outputDir:“bin\Windows\Content” /intermediateDir:“obj\Windows\Content”” exited with code 1.

Importer ‘XmlInporter’ had an unexpected failure!

I’m not sure what I’m doing wrong. I can get the XML to work without the errors when I set the Asset type to System.Collections.Generic.Dictionary, so I think it might be a problem with the reference to the library. In the library project folder there are 4 different .dll files and I’ve tried all of them and none work. Any help would be appreciated.

Hi, I’ve had the same problem, I’ve fixed it by double click on the csproj icon and replace netcore3.1 [at line {4} ] by net4.7. Off course might have installed the net4.7 sdk !