每次运行应用程序时,我都会收到错误异常错误消息:
消息:已添加具有相同密钥的项目。
完整的 InnerException 错误信息如下:
=========================
Exception Information
=========================
Message: The type initializer for 'Devart.DbForge.QueryBuilder.QueryBuilderControl' threw an exception.
Source: Devart.DbForge.QueryBuilder
TargetSite: Void .ctor()
HelpLink:
Type: System.TypeInitializationException
Place: 2
Stack:
at Devart.DbForge.QueryBuilder.QueryBuilderControl..ctor()
at Devart.DbForge.QueryBuilder.QueryBuilderService.CreateQueryBuilder()
at Devart.DbForge.SqlDocument.DyMBowSEe()
at Devart.DbForge.SqlDocument.CreateViewControl(IDocumentView view)
at Devart.DbForge.SqlDocument..ctor(IIocContainer container, String fileName, String initialView, Encoding encoding, IHierarchy hierarchy, INode item)
at Devart.DbForge.SqlServer.SqlServerSqlDocument..ctor(IIocContainer container, String fileName, String initialView, Encoding encoding, IHierarchy hierarchy, INode item)
at Devart.DbForge.SqlServer.SqlDocumentFactory.InternalCreateDocument(String moniker, String& view, Boolean createNew, Encoding encoding, IHierarchy hierarchy, INode item)
at Devart.DbForge.DocumentFactory.CreateDocument(String moniker, String& view, Boolean createNew, Encoding encoding, IHierarchy hierarchy, INode item, IPropertyProvider docData, Boolean isModal)
at Devart.Shell.AbstractDocumentService.CreateDocument(String moniker, String& view, Guid factoryId, Boolean createNew, Encoding encoding, IHierarchy hierarchy, INode item, Boolean isModal)
at Devart.Shell.AbstractDocumentService.CreateDocument(String moniker, String view, Guid factoryId, Boolean createNew, Encoding encoding, IHierarchy hierarchy, INode item)
at Devart.DbForge.DbObjects.DbObjectPopupProvider.pPCTilZstB(ICommand , CommandStatus& , Object )
at Devart.Shell.Common.CommandTargetHelper.InvokeCommand(ICommand command, Object instance)
at Devart.Shell.CommandBarService.InvokeCommand(ICommand command, ICollection objects, ICommandTarget primaryCommandTarget)
at Devart.Shell.CommandBarBase.OnItemClicked(IInternalBarControl control)
at Devart.Shell.MenuBar.OnItemClicked(IInternalBarControl control)
at Devart.Shell.CommandBarButton.Button_Click(Object sender, ItemClickEventArgs e)
at Controls.Bars.BarItem.OnClick(BarItemLink link)
at Controls.Bars.BarBaseButtonItem.OnClick(BarItemLink link)
at Controls.Bars.BarButtonItem.OnClick(BarItemLink link)
at Controls.Bars.BarItemLink.OnLinkClick()
at Controls.Bars.BarButtonItemLink.OnLinkClick()
at Controls.Bars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
at Controls.Bars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
at Controls.Bars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
at Controls.Bars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
at Controls.Bars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
at Controls.Bars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Controls.Bars.Controls.CustomControl.WndProc(Message& msg)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Start of InnerException
Message: An item with the same key has already been added.
Source: mscorlib
TargetSite: Void ThrowArgumentException(System.ExceptionResource)
HelpLink:
Type: System.ArgumentException
Stack:
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item)
at System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item)
at Devart.Diagram.DiagramPalette.GetPen(Color color, Dimension width, PenAlignment alignment)
at Devart.Diagram.DiagramPalette..ctor(ViewService viewService)
at Devart.Diagram.ViewService..ctor(DiagramOptions options)
at Devart.Diagram.Diagram..ctor(String diagramTypeId, IServiceProvider parentProvider)
at Devart.Diagram.Overview.OverviewAddIn..ctor()
at Devart.DbForge.Diagramming.Overview..ctor()
at Devart.DbForge.QueryBuilder.QueryBuilderControl..cctor()
End of InnerException
=========================
Window Layout
=========================
Active document window: 'Merge_SubStage.sql' (Code)
Active window: 'Database Explorer'
Active document 'Merge_SubStage.sql'
Documents:
Name: 'initial-dev.sql', Caption: 'initial-dev.sql', Visible: False, Active view: 'Code', Initial view: 'Code'
Connection name: 'DESKTOP-GV10S60\MSSQLSERVERCARLT', Is open: 'True', Server version: '15.00.2070' string: 'Data Source=DESKTOP-GV10S60\MSSQLSERVERCARLT;Encrypt=False;Integrated Security=False;User ID=lucy'
Name: 'Merge_SubStage.sql', Caption: 'Merge_SubStage.sql', Visible: True, Active view: 'Code', Initial view: 'Code'
Connection name: 'DESKTOP-GV10S60\MSSQLSERVERCARLT', Is open: 'True', Server version: '15.00.2070' string: 'Data Source=DESKTOP-GV10S60\MSSQLSERVERCARLT;Encrypt=False;Integrated Security=False;User ID=lucy'
Toolwindows (visible or have been shown in current session):
Caption: 'Database Explorer', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'True', State: Docked
Caption: 'Find Results', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'True', State: Docked
Caption: 'Error List', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'True', State: Docked
Caption: 'Output', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'True', State: Docked
Caption: 'Start Page', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'True', State: Tabbed
=========================
Connections
=========================
DESKTOP-GV10S60\MSSQLSERVERCARLT (open) - 'Data Source=DESKTOP-GV10S60\MSSQLSERVERCARLT;Encrypt=False;Integrated Security=False;User ID=lucy'. Server version: 15.00.2070
CP-PretBIHydr8Config.cp-retbihydr8config.database.windows.net (current) (open) - 'Data Source=cp-retbihydr8config.database.windows.net;Encrypt=False;Initial Catalog=CP-PretBIHydr8Config;Integrated Security=False;User ID=carlton@keyloop.co.uk;Authentication="Active Directory Password"'. Server version: 12.0.2000.8
CP-pretbireferencedev.cp-retbihydr8config.database.windows.net (open) - 'Data Source=cp-retbihydr8config.database.windows.net;Encrypt=False;Initial Catalog=CP-pretbireferencedev;Integrated Security=False;User ID=carlton@keyloop.co.uk;Authentication="Active Directory Password"'. Server version: 12.0.2000.8
cp-metadata-transform-db-test.cp-retbihydr8config.database.windows.net - 'Data Source=cp-retbihydr8config.database.windows.net;Encrypt=False;Initial Catalog=cp-metadata-transform-db-test;Integrated Security=False;User ID=carlton@keyloop.co.uk;Authentication="Active Directory Password"'
Execution history
Store queries: True
Store period : 60 (days)
Available period : 60 (days)
Folder: %appdata%\Devart\dbForge Studio for SQL Server\ExecutedQueries
Max script size: 1024 (KB)
Initial interval: Week
History folder content:
C:\Users\Carlton\AppData\Roaming\Devart\dbForge Studio for SQL Server\ExecutedQueries\ExecutedQueries.db (8822784)
该错误是由我用来运行 SQL 查询的 SQL 应用程序生成的。您对如何解决此问题有任何想法吗?
谢谢