ToHTML Problem #261

Closed
opened 2026-01-29 14:31:57 +00:00 by claunia · 4 comments
Owner

Originally created by @1Zero3Tech on GitHub (Jan 18, 2019).

Hi,

Using Visual Studio 2017 Community, Build 15.9.5. ASP .Net Core 2.2

I have a simple Markdown.cs file in the root directory of my project that looks like this:

using Markdig;

namespace MarkDig_Test
{
    public static class Markdown
    {
        public static string Parse(string markdown)
        {
            var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
            return Markdown.ToHTML(markdown, pipeline);
        }
    }
}

I am getting the following error in Visual Studio:

Markdown does not contain a definition for ToHTML

I am confused by this... Any guidance appreciated. Thanks.

Originally created by @1Zero3Tech on GitHub (Jan 18, 2019). Hi, Using Visual Studio 2017 Community, Build 15.9.5. ASP .Net Core 2.2 I have a simple Markdown.cs file in the root directory of my project that looks like this: ``` using Markdig; namespace MarkDig_Test { public static class Markdown { public static string Parse(string markdown) { var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); return Markdown.ToHTML(markdown, pipeline); } } } ``` I am getting the following error in Visual Studio: > Markdown does not contain a definition for ToHTML I am confused by this... Any guidance appreciated. Thanks.
Author
Owner

@MihaZupan commented on GitHub (Jan 18, 2019):

It's ToHtml not ToHTML

@MihaZupan commented on GitHub (Jan 18, 2019): It's `ToHtml` not `ToHTML`
Author
Owner

@1Zero3Tech commented on GitHub (Jan 18, 2019):

It's ToHtml not ToHTML

My Intellisense in Visual Studio does not offer a .ToHtml option.

Available options:
Equals
Parse
ReferenceEquals

@1Zero3Tech commented on GitHub (Jan 18, 2019): > It's `ToHtml` not `ToHTML` My Intellisense in Visual Studio does not offer a .ToHtml option. Available options: Equals Parse ReferenceEquals
Author
Owner

@MihaZupan commented on GitHub (Jan 18, 2019):

Aw I see, you've named your class Markdown as well and you therefore hide the one implemented in Markdig.

@MihaZupan commented on GitHub (Jan 18, 2019): Aw I see, you've named your class `Markdown` as well and you therefore hide the one implemented in Markdig.
Author
Owner

@1Zero3Tech commented on GitHub (Jan 18, 2019):

Oh my gosh... Yes.

THANKS!

@1Zero3Tech commented on GitHub (Jan 18, 2019): Oh my gosh... Yes. THANKS!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#261