I'm getting this error from Resharper when I add abstract generic class in
<configuration>
<system.web.webPages.razor>
<pages pageBaseType="LegalAudit.Web.WebViewPageBase">
...
And the class:
public abstract class WebViewPageBase<TModel> : WebViewPage<TModel>
{
// ...
}
It reappears from time to time after making "Ignore this error" in the error list. How to get rid of it totally?
(There is a linked question at here but it is not connected to resharper.)
Thanks!
Making another non generic class solved the error:
public abstract class WebViewPageBase<TModel> : WebViewPage<TModel>
{
// ...
}
public abstract class WebViewPageBase : WebViewPageBase<object>
{
}
When I add the following to the web.config, the error goes away, as expected. Reshaper, correctly, wants you to specify a specific implementation of WebViewPageBase
:
<system.web.webPages.razor>
<pages pageBaseType="MvcApplication1.WebViewPageBase`1[[TModel]]">
</pages>
</system.web.webPages.razor>
And
namespace MvcApplication1
{
using System.Web.Mvc;
public abstract class WebViewPageBase<TModel> : WebViewPage<TModel>
{
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With