disabling warnings for hiding an inherited member

Sep 17, 2012 at 10:01 PM

So can we get 

#pragma warning disable 108

right near the 1591 warning disable too?

Seems silly to generate all these warnings when you are intending it.  Makes the build server more concise too...  :)

Sep 17, 2012 at 10:37 PM

Under what scenario is it hiding an inherited member? The normal behavior is for it to override a virtual method, which should not cause any warnings.

May 22, 2013 at 2:26 PM
I get the build warnings on my build machine as well. I'm running the latest T4MVC and I get gobs of build warnings like...
Brokers.CustomersController.generated.cs (34): 'CC.Magnifico.Web.Areas.Brokers.Controllers.CustomersController.RedirectToAction(System.Web.Mvc.ActionResult)' hides inherited member 'CC.Magnifico.Web.Areas.Brokers.Controllers.BrokerController.RedirectToAction(System.Web.Mvc.ActionResult)'. Use the new keyword if hiding was intended.
May 22, 2013 at 2:29 PM
Ignore my last post. I found the answer at https://t4mvc.codeplex.com/discussions/354443. Although, in my case, I cannot make my base class abstract because I'm applying [AuthorizeAttribute] to the base class. I might be able to make the base class abstract if I use FluentSecurity (http://www.fluentsecurity.net/) to add the AuthorizeAttribute. Will try to report back here if it works.
May 22, 2013 at 8:19 PM
Yes, I was able to do exactly what I wanted with FluentSecurity.net. No more build errors either.