---
title: "Class '<classname>' must declare a 'Sub New' because the '<constructorname>' in its base class '<baseclassname>' is marked obsolete"
ms.date: 07/20/2015
f1_keywords: 
  - "vbc30917"
  - "bc30917"
helpviewer_keywords: 
  - "BC30917"
ms.assetid: 764d222d-e058-40ad-a354-29b956a8027b
---
# Class '\<classname>' must declare a 'Sub New' because the '\<constructorname>' in its base class '\<baseclassname>' is marked obsolete

A class declaration does not include a constructor, and the base class constructor is marked with the <xref:System.ObsoleteAttribute> attribute and the directive to treat it as an error.  
  
 When a derived class does not declare a constructor, Visual Basic attempts to generate an implicit parameterless constructor that calls `MyBase.New()`. If there is no accessible constructor in the base class that can be called without arguments, Visual Basic cannot generate an implicit constructor. In this case, the required constructor is marked with the <xref:System.ObsoleteAttribute> attribute, so Visual Basic cannot call it.  
  
 You can mark any programming element as being no longer in use by applying <xref:System.ObsoleteAttribute> to it. If you do this, you can set the attribute's <xref:System.ObsoleteAttribute.IsError%2A> property to either `True` or `False`. If you set it to `True`, the compiler treats an attempt to use the element as an error. If you set it to `False`, or let it default to `False`, the compiler issues a warning if there is an attempt to use the element.  
  
 **Error ID:** BC30917  
  
## To correct this error  
  
- Use `Sub New` to declare a constructor in the derived class.
