"A data source object must be of a visible type or implement 'System.Collections.IEnumerable'. Parameter name: dataSource"

I am trying to convert my MailMerge application to ReportingEngine, and I’m running into an issue.
I have seperated my DocumentGenerator code from my main application by placing it in a seperate project.
The object containing the data that needs to be inserted is of type TData (a generic type argument). This type is defined in my main project. This is my code for generating the report:

public Stream GenerateReport(TData Data)
{
    ReportingEngine Engine = new ReportingEngine();
    Document Document = Report.Build(Data, Engine);

    MemoryStream Stream = new MemoryStream();
    Document.Save(Stream, SaveFormat.Docx);
    Stream.Position = 0;
    return Stream;
}

public virtual Document Build<TData>(TData Data, ReportingEngine Engine)
{
    Document Document = new Document("Content/Templates/" + TemplateName);
    Engine.BuildReport(Document, Data);

    //Apply Properties
    foreach (Section s in Document.Sections) { s.PageSetup.PaperSize = PageSize; }

    return Document;
}

When running this code, I get an error on the Engine.BuildReport line, saying "A data source object must be of a visible type or implement 'System.Collections.IEnumerable'. Parameter name: dataSource".

What is the cause of this error? Is it because my Data Types are defined in a different project? If so, is there a way to solve this while keeping the report-generation code seperate from the main project?

Oh my god, I’m such an idiot. The Data class wasn’t public. Feel free to remove this post.