3

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

Irwan
  • 783
  • 1
  • 13
  • 28
  • have you tried to remove the comment? – bryanmac Jul 11 '12 at 05:10
  • @bryanmac : no, is it ok to remove them ? – Irwan Jul 11 '12 at 05:25
  • I tried to remove the comment, the error turns into: Error 1 Warning as Error: Missing XML comment for publicly visible type or member 'FreeImageAPI.Plugins.PluginRepository.Plugin(string)' C:\Users\Public\Documents\@Programming\FreeImage\Wrapper\FreeImage.NET\cs\Library\Classes\PluginRepository.cs 62 33 Library – Irwan Jul 11 '12 at 05:51

2 Answers2

1

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

Marcelo Zabani
  • 2,139
  • 19
  • 27
1

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'.
GrandAdmiral
  • 1,348
  • 2
  • 24
  • 52