Building FreeImage.net on Visual Studio 2010 Express
-
20-06-2021 - |
Question
It display 39 errors. All errors are like this:
Error 1 Warning as Error: XML comment on 'FreeImageAPI.Plugins.PluginRepository.Plugin(string)' has a typeparamref tag for 'expression', but there is no type parameter by that name C:\Users\Public\Documents\@Programming\FreeImage\Wrapper\FreeImage.NET\cs\Library\Classes\PluginRepository.cs 63 27 Library
on source file:
/// <summary>
/// Returns an instance of <see cref="FreeImageAPI.Plugins.FreeImagePlugin"/>.
/// <typeparamref name="expression"/> is searched in:
/// <c>Format</c>, <c>RegExpr</c>,
/// <c>ValidExtension</c> and <c>ValidFilename</c>.
/// </summary>
/// <param name="expression">The expression to search for.</param>
/// <returns>An instance of <see cref="FreeImageAPI.Plugins.FreeImagePlugin"/>.</returns>
public static FreeImagePlugin Plugin(string expression)
{
FreeImagePlugin result = null;
expression = expression.ToLower();
foreach (FreeImagePlugin plugin in plugins)
{
if (plugin.Format.ToLower().Contains(expression) ||
plugin.RegExpr.ToLower().Contains(expression) ||
plugin.ValidExtension(expression, StringComparison.CurrentCultureIgnoreCase) ||
plugin.ValidFilename(expression, StringComparison.CurrentCultureIgnoreCase))
{
result = plugin;
break;
}
}
return result;
}
How do i fix it ? Thanks in advance
Solution
You should change <typeparamref name="expression"/>
to <paramref name="expression"/>
.
<typeparamref>
is intended to describe a type parameter (as in generics) and not the name of a parameter that is received by the method.
OTHER TIPS
I ran into the same thing and I solved it by:
- Right click on your project and select 'Properties'.
- Select the 'Build' tab on the left side.
- Go to the 'Treat warnings as errors' section and select 'None'.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow