我开始在使用伪选择器的地方有一些例外:第一。当我在Visual Studio中将我的目标框架从4改为4.5.1时,就开始发生这种情况。之前运行的代码没有任何错误。使用CsQuery的其他一切似乎都能正常工作。CsQuery伪选择器异常
在我的项目引用我有CsQuery.1.3.5.124,我想这可能是一个错误,不知道。它以前工作得很好。
有帮助吗?
谢谢。
有
Stack trace:
[ArgumentException: The key already existed in the dictionary.]
System.Collections.Concurrent.ConcurrentDictionary`2.System.Collections.Generic.IDictionary<TKey,TValue>.Add(TKey key, TValue value) +10940468
CsQuery.Engine.PseudoSelectors.PopulateFromAssembly(Assembly assy, String[] nameSpaces) +344
CsQuery.Engine.PseudoSelectors.Register(Assembly assembly) +153
CsQuery.Engine.PseudoSelectors.PopulateInnerSelectors() +305
CsQuery.Engine.PseudoSelectors..ctor() +168
CsQuery.Engine.PseudoSelectors..cctor() +44
[TypeInitializationException: The type initializer for 'CsQuery.Engine.PseudoSelectors' threw an exception.]
CsQuery.Engine.PseudoSelectors.get_Items() +0
CsQuery.Engine.SelectorParser.AddPseudoSelector(String key) +49
CsQuery.Engine.SelectorParser.Parse(String selector) +2360
CsQuery.Engine.Selector..ctor(String selector) +103
CsQuery.CQ.Select(String selector) +83
CsQuery.CQ.get_Item(String selector) +42
你能分享你的代码吗? – 2015-02-06 12:16:03