[英]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". 当我添加表以对其进行引用时,我添加了引用presentationFramework.dll以开始使用名称空间“ System.Windows.Documents”。 Then it started giving me 3 errors
然后它开始给我3个错误
The type 'System.Windows.Markup.IAddChild' is defined in an assembly that is not referenced.
类型“ System.Windows.Markup.IAddChild”在未引用的程序集中定义。 You must add a reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
您必须添加对程序集“ PresentationCore,版本= 4.0.0.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35”的引用。
The type 'System.Windows.IInputElement' is defined in an assembly that is not referenced.
类型'System.Windows.IInputElement'在未引用的程序集中定义。 You must add a reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
您必须添加对程序集“ PresentationCore,版本= 4.0.0.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35”的引用。
The type 'System.Windows.ContentElement' is defined in an assembly that is not referenced.
类型“ System.Windows.ContentElement”在未引用的程序集中定义。 You must add a reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
您必须添加对程序集'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. 添加对PresentationCore DLL的引用,该引用也位于GAC中并且是必需的。
Brian 布赖恩
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.