Commented Issue: SparkSense throws an exception whenever it runs [6846]

10 views
Skip to first unread message

sparkviewengine Issue Tracker Rss Feed

unread,
Aug 17, 2010, 12:42:02 PM8/17/10
to spar...@googlegroups.com
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.BuildViewMapFromProjectEnvironment() at SparkSense.Parsing.ProjectExplorer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExplorer.GetViewFolder() at SparkSense.Parsing.ViewExplorer.InitCurrentView() at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionListe
ner.TryCreateCompletionSource(ITextBuffer textBuffer) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.<>c__DisplayClass1.<CreateSourcesForBuffer>b__0(ICompletionSourceProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource) Editor or Editor Extension 2010/08/10 15:49:12.712
Comments: ** Comment from web user: Rohland **

I am getting a similar result. As soon as I open a spark file and attempt to invoke the intellisense the extension crashes. After reviewing the log file, I found the following exception:

System.ArgumentNullException: Value cannot be null.&#x000D;&#x000A;Parameter name: oldValue&#x000D;&#x000A; at System.String.Replace(String oldValue, String newValue)&#x000D;&#x000A; at SparkSense.Parsing.ProjectExplorer.GetCurrentViewPath()&#x000D;&#x000A; at SparkSense.Parsing.ViewExplorer.InitCurrentView()&#x000D;&#x000A; at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer)&#x000D;&#x000A; at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer)&#x000D;&#x000A; at SparkSense.StatementCompletion.CompletionListener.TryCreateCompletionSource(ITextBuffer textBuffer)&#x000D;&#x000A; at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.&lt;&gt;c__DisplayClass1.&lt;CreateSourcesForBuffer&gt;b__0(ICompletionSourceProvider provider)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataV
iew](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource)

URL: http://sparkviewengine.codeplex.com/workitem/6846

sparkviewengine Issue Tracker Rss Feed

unread,
Aug 18, 2010, 12:42:02 PM8/18/10
to spar...@googlegroups.com
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.BuildViewMapFromProjectEnvironment() at SparkSense.Parsing.ProjectExplorer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExplorer.GetViewFolder() at SparkSense.Parsing.ViewExplorer.InitCurrentView() at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionListe
ner.TryCreateCompletionSource(ITextBuffer textBuffer) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.<>c__DisplayClass1.<CreateSourcesForBuffer>b__0(ICompletionSourceProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource) Editor or Editor Extension 2010/08/10 15:49:12.712
Comments: ** Comment from web user: RobertGreyling **

I've fixed the bug in my local build for the original issue. This will be released soon, but you can get it from source if you're desperate. @Rohland, I don't think yours is the same issue, it's happening in an entirely different area of the code and I think it might be because you don't have your views in a "Views" folder in the solution. Just guessing, but I'll look into it anyway, I don't want the exception thrown, I'd rather have the IntelliSense just *not* work.

URL: http://sparkviewengine.codeplex.com/workitem/6846

sparkviewengine Issue Tracker Rss Feed

unread,
Aug 19, 2010, 6:42:03 AM8/19/10
to spar...@googlegroups.com
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.BuildViewMapFromProjectEnvironment() at SparkSense.Parsing.ProjectExplorer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExplorer.GetViewFolder() at SparkSense.Parsing.ViewExplorer.InitCurrentView() at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionListe
ner.TryCreateCompletionSource(ITextBuffer textBuffer) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.<>c__DisplayClass1.<CreateSourcesForBuffer>b__0(ICompletionSourceProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource) Editor or Editor Extension 2010/08/10 15:49:12.712
Comments: ** Comment from web user: alex_clark **

I had this problem - I fixed it by doing the following:

Go through each View folder in the solution and check that Studio hasn't added the same spark file twice to the solution. In my case, it had doubled up a file called details.spark. The solution would compile fine, but the sparksense threw the error.

URL: http://sparkviewengine.codeplex.com/workitem/6846

sparkviewengine Issue Tracker Rss Feed

unread,
Aug 19, 2010, 6:42:03 AM8/19/10
to spar...@googlegroups.com
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.BuildViewMapFromProjectEnvironment() at SparkSense.Parsing.ProjectExplorer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExplorer.GetViewFolder() at SparkSense.Parsing.ViewExplorer.InitCurrentView() at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionListe
ner.TryCreateCompletionSource(ITextBuffer textBuffer) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.<>c__DisplayClass1.<CreateSourcesForBuffer>b__0(ICompletionSourceProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource) Editor or Editor Extension 2010/08/10 15:49:12.712
Comments: ** Comment from web user: Rohland **

I just realised that I attempted to use the plugin on a webforms project that was recently integrated with MVC. There was a 'Views' folder but I noticed that the folder name was all lowercase. I haven't re-attempted to use the plugin on this specific project, but that may be the issue.

URL: http://sparkviewengine.codeplex.com/workitem/6846

Reply all
Reply to author
Forward
0 new messages