ルート要素タグで指定されている x:TypeArguments 属性をサポートするには x:Class 属性を必要とします。
カスタムコントロールを含むプロジェクトに、ページ関数 (PageFunction) を追加したところ、Generic.xaml で、コンパイルエラーが発生するようになった。
'ResourceDictionary' ルート要素はジェネリック型です。ルート要素タグで指定されている x:TypeArguments 属性をサポートするには x:Class 属性を必要とします。 行 2 位置 5.
Generic.xaml はリソースディクショナリなので、ルート要素に x:TypeArguments はない。こんな感じ。
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MyProject">
つまり、このメッセージはまったくのナゾ。追加したページ関数のほうには x:TypeArguments アトリビュートがあるけどね。これもバグっぽい・・・。フィードバックあり。
フィードバック: Strange xaml compilation error MC6025 in unrelated class?
MSDN Folums: Strange xaml compilation error MC6025 in unrelated class?
結局、 Generic.xaml のルートタグに x:Class="object" を追加することで回避。こんなことに時間とられてばかり・・・。
トラックバック
- このエントリーにトラックバック:
- http://frog.raindrop.jp/cgi-bin/mt/mt-tb.cgi/2180
コメント