I'm working on a Winforms project and want to display the About page content from an HTML file. I used the WebBrowser control for that but even though it works, I still get the following error message upon opening the solution or building the project:
Is there any way to fix it or ignore it?
Here's the method call from the About page class:
private void displayAboutContent()
{
this.labelVersion.Text = string.Format(@"Version: {0}",BoostEngine.r_CurrentVersion);
UITools.displayHTMLPage(m_WebBrowser, m_ResourceName);
}
and the UI Tools static class:
public static class UITools
{
public static void displayHTMLPage(WebBrowser i_WebBrowser, string i_ResourceName)
{
Uri uri = new Uri(getFilepath(i_ResourceName));
i_WebBrowser.ScriptErrorsSuppressed = true;
i_WebBrowser.Navigate(uri);
}
private static string getFilepath(string i_ResourceName)
{
string projectPath = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName;
string filePath = Path.Combine(projectPath, string.Format("Resources\\{0}.html", i_ResourceName));
return filePath;
}
}
P.S. I'm using this code on another form but receive the error only for the About page. Also important to note, I'm using a Parallels VM on Mac.
Thanks!