Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building FreeImage.net on Visual Studio 2010 Express

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

like image 710
Irwan Avatar asked Nov 23 '25 06:11

Irwan


2 Answers

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.

Check typeparamref here and paramref here

like image 171
Marcelo Zabani Avatar answered Nov 24 '25 20:11

Marcelo Zabani


I ran into the same thing and I solved it by:

  1. Right click on your project and select 'Properties'.
  2. Select the 'Build' tab on the left side.
  3. Go to the 'Treat warnings as errors' section and select 'None'.
like image 29
GrandAdmiral Avatar answered Nov 24 '25 20:11

GrandAdmiral



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!