Error when building project - NPOI.SS.UserModel.FontBoldWeight' does not contain a definition for 'BOLD'

Aug 19, 2014 at 8:39 AM
Hi,

Apologies but I'm new to this, I've picked up a project from a colleague that left (with no handover). I opened up his project and noticed a missing reference of NPOI. I downloaded the latest version and updated the reference, now when I try to build the project I get the following error:
NPOI.SS.UserModel.FontBoldWeight' does not contain a definition for 'BOLD'
which relates to the following code:
            IFont titleFont = _Workbook.CreateFont();
            titleFont.Boldweight = (short)FontBoldWeight.BOLD;
I know this was built previously as there is a version of the application that works. Any help would be appreciated.
Aug 19, 2014 at 9:25 AM
It seems that this was just a case sensitivity issue:
titleFont.Boldweight = (short)FontBoldWeight.BOLD;
should have been:
titleFont.Boldweight = (short)FontBoldWeight.Bold;
Marked as answer by inexorous on 8/19/2014 at 2:25 AM