Table namespace error in vs2010/c#
I added a table in my project which is along these lines:
Table table1 = new Table();
table1.RowGroups.Add(new TableRowGroup());
table1.RowGroups[1].Rows.Add(new TableRow());
TableRow currentRow = table1.RowGroups[1].Rows[1];
When I added the table, to reference it, i added a reference presentationFramework.dll to start using the namespace "System.Windows.Documents". Then it started giving me 3 errors
The type 'S开发者_JS百科ystem.Windows.Markup.IAddChild' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
The type 'System.Windows.IInputElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
The type 'System.Windows.ContentElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
I don't understand this. What should I do to correct this error?
Please help me
Add a reference to PresentationCore DLL, which is also in the GAC and is required.
Brian
精彩评论