SHFB
SHFB copied to clipboard
Error BE0065: An error occurred while attempting to transform the reflection data to a topic. When Extensions Methods to Enum.
Hi there,
When matching Extensions Methods to Enum throws an Error BE0065: An error occurred while attempting to transform the reflection data to a topic. The error message was: System.NullReferenceException
/// <summary>
/// Page size enum options
/// </summary>
public enum PageSize
{
/// <summary>
/// A4 size 21cm x 29.7cm.
/// </summary>
A4,
/// <summary>
/// Letter size 21.59cm x 27.94cm
/// </summary>
Letter,
/// <summary>
/// Office size 21.59cm x 35.56cm
/// </summary>
Office
}
/// <summary>
/// Extension methods for Page Size helper.
/// </summary>
public static class PageSizeExtension
{
/// <summary>
/// Get the size for a pageSize enum.
/// </summary>
/// <param name="pageSize">The pageSize enum item at issue.</param>
/// <returns>The size (width and height) of the page at issue.</returns>
public static Size Size (this PageSize pageSize)
{
switch (pageSize)
{
case PageSize.A4: return new Size() { Width = "21cm", Height = "29.7cm" };
case PageSize.Letter: return new Size() { Width = "21.59cm", Height = "27.94cm" };
case PageSize.Office: return new Size() { Width = "21.59cm", Height = "35.56cm" };
default : return null;
}
}
}
I've edited API Filter in Project Properties -> Visibility -> Edit API Filter to disable PageSizeExtension class and bypass the error. But I know it's not the solution even a workarround. But I needed build the project.
That is about: Sandcastle Help File Builder and Tools Version: 2024.2.18.0