System.Data.SQLite

Login
This project makes use of Eagle, provided by Mistachkin Systems.
Eagle: Secure Software Automation
Ticket Hash: 3c00ec5b521b71073b7417d12daddb2c509e5691
Title: Columns without defined type are not identified as text (when using Entity Framework 6 design-time support)
Status: Closed Type: Feature_Request
Severity: Important Priority: Immediate
Subsystem: Convert Resolution: Fixed
Last Modified: 2014-06-16 19:30:58
Version Found In: 1.0.92.0
User Comments:
anonymous added on 2014-05-14 14:45:31:
When generating an Entity Framework model for an existing database with a schema where text columns have no set type the following warning is produced by Entity Framework Model generation and the column is ignored in the resulting model:
"warning 6005: The data type '' is currently not supported for the target .NET Framework version; the column 'Title' in table 'db.Files' was excluded."

Schema may look as follows:
CREATE TABLE File (ID INTEGER PRIMARY KEY, File UNIQUE COLLATE NOCASE, Size INTEGER, Title COLLATE NOCASE, Description)

Since Sqlite has no actual datatypes and everything is stored as text internally it would make sense if a column without a datatype would be treated as text for any data mapping purposes.

mistachkin added on 2014-05-14 18:08:50:
The ability to override the defaults is now actively being worked on for release
1.0.93.0.

mistachkin added on 2014-05-14 18:54:59:
See check-in [9c5dda4992].

mistachkin added on 2014-05-14 20:15:37:
Merged to trunk via check-in [cf20301f89].

anonymous added on 2014-05-14 22:58:39:
Forgive my ignorance but is it possible to have this work with the design-time components for Visual Studio and auto-generated edmx?

In a code-first scenario I could pass in a custom DbConnection to the DbContext in order to set the default DbType on a per-connection basis.

mistachkin added on 2014-05-14 23:03:32:
If the connection string can be controlled, yes.  However, changing the existing "default" behavior would not be backward compatible.

anonymous added on 2014-05-14 23:43:28:
I'm afraid adding "DefaultDbType=String;DefaultTypeName=TEXT" to the connection string before model generation is not working. Same error as before:
"Error 6005: The data type '' is currently not supported for the target .NET Framework version; the column 'Title' in table 'db.File' was excluded."

Is this working on your end?

mistachkin added on 2014-05-15 00:07:19:
It is now possible (on trunk) to override the defaults using environment variables
or the DLL configuration file, see check-in [216889c23b].

anonymous added on 2014-05-15 00:47:11:
Getting an error thrown in Visual Studio when completing the entity data model wizard on the new trunk.

Error reads:
An error occurred while connection to the database. The database might be unavailable. An exception of type 'System.Data.EntityCommandExecutionException' occurred. The error message is: 'An error occurred while executing the command definition. See the inner exception for details.
The inner exception caught was of type 'System.FormatException', with this error message: 'String was not recognized as a valid Boolean.'.'.

This happens regardless of the environment variable being set or not.

anonymous added on 2014-05-15 07:31:10:
The error detailed in my last remark somehow fixed itself and was not an issue with System.Data.SQLite. Sorry about that.

However the problem still remains that auto-generating a model through the model designer and design-time components is not working. Building of the latest trunk and using environment variables or appsettings to override the default DbType and TypeName still results in the dreaded "error 6005".

For reference these are the appsettings I'm using:
  <appSettings>
    <add key="Use_SQLiteConvert_DefaultDbType" value="String" />
    <add key="Use_SQLiteConvert_DefaultTypeName" value="TEXT" />
  </appSettings>

mistachkin added on 2014-05-15 14:31:10:
From the download page:

For each configuration setting, the associated environment variable value, if present, will override the value specified via the XML configuration file.

For the full .NET Framework, the XML configuration file must be named "System.Data.SQLite.dll.config" and it must be present in the base directory for the application domain or the directory containing the primary System.Data.SQLite assembly as reported by its location property; otherwise, it will be ignored.

For the .NET Compact Framework, the XML configuration file must be named "System.Data.SQLite.dll.config" and it must be present in the directory containing the primary System.Data.SQLite assembly; otherwise, it will be ignored.

anonymous added on 2014-05-15 16:20:11:
Okay, I put the xml configuration in the wrong place but had also tried the environment variable approach. It explains why I stopped getting the [System.FormatException] 'String was not recognized as a valid Boolean.' because adding the xml configuration to the correct file brings it back.

I've enabled logging in Visual Studio but the exception is not caught in the log files. Attaching a second debugger to the Visual Studio instance breaks with only native system libraries lacking symbols on the stack. Not sure what else to try.

mistachkin added on 2014-05-15 16:37:43:
That looks like an ADO.NET error message.  I'm pretty sure Boolean values in the database tables must be "true", "false", 1, or 0.

anonymous added on 2014-05-15 19:14:38:
Getting the same error on an empty database creating using the sql-query:
CREATE TABLE File (ID INTEGER PRIMARY KEY, File UNIQUE COLLATE NOCASE, Size INTEGER, Title COLLATE NOCASE, Description)

You cannot replicate this error?

mistachkin added on 2014-05-15 20:04:53:
Where is the boolean type conversion coming from?  Is it from the Entity
Framework?  Given the provided details, I'm having trouble understanding
the origin of the FormatException.  It seems like it would only be raised
if a database table had a column with a type that the Entity Framework
sees as "Boolean".

anonymous added on 2014-05-15 21:34:04:
I managed to get some additional exception information using WinDbg

Exception type:   System.FormatException
Message:          String was not recognized as a valid Boolean.
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    178CDB08 7A39DC1A mscorlib_ni!System.Boolean.Parse(System.String)+0xa4276a
    178CDB1C 7998F080 mscorlib_ni!System.String.System.IConvertible.ToBoolean(System.IFormatProvider)+0x10
    178CDB24 799E5210 mscorlib_ni!System.Convert.ToBoolean(System.Object, System.IFormatProvider)+0x20
    178CDB30 17A36A4B System_Data_SQLite!System.Data.SQLite.SQLiteDataReader.GetBoolean(Int32)+0x73
    178CDB44 17A338B4 System_Data_SQLite!System.Data.SQLite.SQLiteConnection.Schema_Indexes(System.String, System.String, System.String)+0xaec
    178CDC50 0B59AB3A System_Data_SQLite!System.Data.SQLite.SQLiteConnection.GetSchema(System.String, System.String[])+0x262
    178CDC74 17A323CB System_Data_SQLite!System.Data.SQLite.SQLiteDataReader.GetSchemaTable(Boolean, Boolean)+0x12cb
    178CDEBC 17A36434 System_Data_SQLite!System.Data.SQLite.SQLiteConnection.Schema_Columns(System.String, System.String, System.String)+0x814
    178CDFE4 0B59AB07 System_Data_SQLite!System.Data.SQLite.SQLiteConnection.GetSchema(System.String, System.String[])+0x22f
    178CE008 0B59C181 System_Data_SQLite!System.Data.SQLite.SQLiteConnection.GetSchema(System.String)+0x29
    178CE018 0B59A7D4 UNKNOWN!System.Data.SQLite.Linq.SQLiteProviderServices.System.Data.SQLite.ISQLiteSchemaExtensions.BuildTempSchema(System.Data.SQLite.SQLiteConnection)+0x1a4
    178CE058 0B59A119 System_Data_SQLite!System.Data.SQLite.SQLite3.Prepare(System.Data.SQLite.SQLiteConnection, System.String, System.Data.SQLite.SQLiteStatement, UInt32, System.String ByRef)+0x4e1
    178CE0DC 0B599C19 System_Data_SQLite!System.Data.SQLite.SQLiteCommand.BuildNextCommand()+0x181
    178CE118 0B599A23 System_Data_SQLite!System.Data.SQLite.SQLiteCommand.GetStatement(Int32)+0x13
    178CE128 0B5997AF System_Data_SQLite!System.Data.SQLite.SQLiteDataReader.NextResult()+0x13f
    178CE148 0B5995FB System_Data_SQLite!System.Data.SQLite.SQLiteDataReader..ctor(System.Data.SQLite.SQLiteCommand, System.Data.CommandBehavior)+0xfb
    178CE168 0B59910E System_Data_SQLite!System.Data.SQLite.SQLiteCommand.ExecuteReader(System.Data.CommandBehavior)+0x2e
    178CE17C 0B5990C5 System_Data_SQLite!System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(System.Data.CommandBehavior)+0x5
    178CE180 0BEA3E7B System_Data_ni!System.Data.Common.DbCommand.ExecuteReader(System.Data.CommandBehavior)+0xb
    178CE188 60525F86 System_Data_Entity_ni!System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(System.Data.EntityClient.EntityCommand, System.Data.CommandBehavior)+0x1b6

anonymous added on 2014-05-15 21:52:48:
And the actual line where the exception happens:

System.FormatException: String was not recognized as a valid Boolean.
   at System.Boolean.Parse(String value)
   at System.String.System.IConvertible.ToBoolean(IFormatProvider provider)
   at System.Convert.ToBoolean(Object value, IFormatProvider provider)
   at System.Data.SQLite.SQLiteDataReader.GetBoolean(Int32 i) in c:\System.Data.SQLite-216889c23b4f3c31\System.Data.SQLite\SQLiteDataReader.cs:line 416
   at System.Data.SQLite.SQLiteConnection.Schema_Indexes(String strCatalog, String strTable, String strIndex) in c:\System.Data.SQLite-216889c23b4f3c31\System.Data.SQLite\SQLiteConnection.cs:line 3780

SQLiteConnection.cs:
while (rd.Read())
{
  if (String.Compare(rd.GetString(1), strIndex, StringComparison.OrdinalIgnoreCase) == 0
  || strIndex == null)
  {
	row = tbl.NewRow();

	row["TABLE_CATALOG"] = strCatalog;
	row["TABLE_NAME"] = rdTables.GetString(2);
	row["INDEX_CATALOG"] = strCatalog;
	row["INDEX_NAME"] = rd.GetString(1);
	row["UNIQUE"] = rd.GetBoolean(2);  // <--- Exception

mistachkin added on 2014-05-15 22:42:37:
Thanks for the additional information, it's very useful.  I'm now looking into it.

mistachkin added on 2014-05-15 23:00:59:
I'm now able to reproduce the issue here.

mistachkin added on 2014-05-15 23:44:43:
Fixed on trunk via check-in [5b282efc5f].

anonymous added on 2014-05-16 07:57:47:
The issue seem to go even deeper. With the provided checkin I'm now past that step in the model designer but edmx generation fails with another error in Visual Studio:
String was not recognized as a valid Boolean.Couldn't store <0> in IsServerGenerated Column.  Expected type is Boolean.
String was not recognized as a valid Boolean. C:\SqlLiteDbTest\Model3.edmx	0


The only exception information I've been able to produce so far contain no stack trace of the actual System.Data.SQLite dll:
Exception type:   System.ArgumentException
Message:          String was not recognized as a valid Boolean.Couldn't store <0> in IsServerGenerated Column.  Expected type is Boolean.
InnerException:   System.FormatException
StackTrace (generated):
    SP       IP       Function
    0023A994 0C6480B2 System_Data_ni!System.Data.DataColumn.set_Item(Int32, System.Object)+0x62
    0023AA8C 0C645D1E System_Data_ni!System.Data.DataTable.NewRecordFromArray(System.Object[])+0x7e

StackTraceString: <none>
HResult: 80070057

Inner exception:
Exception type:   System.FormatException
Message:          String was not recognized as a valid Boolean.
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    0023AA24 7A39DC1A mscorlib_ni!System.Boolean.Parse(System.String)+0xa4276a
    0023AA38 7998F080 mscorlib_ni!System.String.System.IConvertible.ToBoolean(System.IFormatProvider)+0x10
    0023AA40 0C9EE375 System_Data_ni!System.Data.Common.BooleanStorage.Set(Int32, System.Object)+0x5d
    0023AA5C 0C64807E System_Data_ni!System.Data.DataColumn.set_Item(Int32, System.Object)+0x2e

StackTraceString: <none>
HResult: 80131537

--------------

Exception type:   Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.Ssdl.DatabaseConnectionSsdlWriter+GenerateSSDLException
Message:          <none>
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    0023AC00 07E2ED21 UNKNOWN!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.Ssdl.DatabaseConnectionSsdlWriter.GenerateStoreSchemaMetadata(Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderSettings, System.Version, System.String, System.Data.Entity.Design.EntityStoreSchemaGenerator ByRef, System.Collections.Generic.IList`1<System.Data.Metadata.Edm.EdmSchemaError> ByRef)+0x231
    0023AC44 07E2E96D UNKNOWN!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.Ssdl.DatabaseConnectionSsdlWriter.WriteSsdl(System.Xml.Linq.XDocument, System.Uri, Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderSettings, System.Xml.XmlWriterSettings, System.Version, System.Diagnostics.Stopwatch, System.Collections.Generic.IList`1<System.Data.Metadata.Edm.EdmSchemaError> ByRef)+0x9d

StackTraceString: <none>
HResult: 80131500

mistachkin added on 2014-05-16 14:12:37:
It looks like the Entity Framework does not like the value zero (0) as a boolean.

If that value is actually coming from System.Data.SQLite, perhaps this could be
addressed there.

Which version of Visual Studio are you using?  What are the steps you used to
setup and use Entity Framework?

anonymous added on 2014-05-16 17:47:13:
Visual Studio 2012
sqlite-netFx45-setup-bundle-x86-2012-1.0.92.0.exe for the design time components
Creating a new .NET 4.5 WinForms application and adding the 1.0.92.0 System.Data.SQLite package from nuget
SQLite GAC DLLs and 1.092.0 nuget package DLLs replaced with custom compiled from latest trunk
Using Entity Framework Database First to generate a model using the SQLite provider and all default options.
Don't have the exact steps in front of me but in essence:
Add data source -> database -> entity framework -> from database -> sqlite provider / select file -> default everything -> select all tables -> complete generation.

This results in the aforementioned error in the Errors-pane and an empty edmx model but no exception popup or such.

mistachkin added on 2014-05-16 19:08:49:
I'm somewhat surprised that installing the design-time components for Visual
Studio ALONG WITH the NuGet package actually works.  Did you also manually GAC
the Entity Framework 6 assembly (i.e. along with the System.Data.SQLite.EF6 one)?

anonymous added on 2014-05-16 20:45:20:
So no nuget if you want to use the design-time components?

Only replaced two DLLs in the GAC and did not manually GAC EF6 assembly:
\GAC_32\System.Data.SQLite\v4.0_1.0.92.0__db937bc2d44ff139\System.Data.SQLite.dll
\GAC_MSIL\System.Data.SQLite.Linq\v4.0_1.0.92.0__db937bc2d44ff139\System.Data.SQLite.Linq.dll

System.Data.SQLite.EF6 is not installed in GAC after having run the installer sqlite-netFx45-setup-bundle-x86-2012-1.0.92.0.exe.

mistachkin added on 2014-05-16 21:37:31:
Can you share the schema for the database you are trying to create?

anonymous added on 2014-05-16 22:00:14:
It's the same schema as before:
CREATE TABLE File (ID INTEGER PRIMARY KEY, File UNIQUE COLLATE NOCASE, Size INTEGER, Title COLLATE NOCASE, Description)

Keeping it simple to limit the number of possible issues. It is a SQLite v3 DB.

anonymous added on 2014-05-16 22:01:54:
To clarify further - File is the only table in the database and the table contains no data.

anonymous added on 2014-05-16 22:04:51:
Same issue with this schema:
CREATE TABLE [TEST] ([ID] INTEGER  NOT NULL PRIMARY KEY)

mistachkin added on 2014-05-16 22:10:02:
Thanks, I'll try to isolate the cause.

mistachkin added on 2014-05-17 01:34:30:
I think I've found the problem.  The IsServerGenerated column is missing from the
SSDL provided by the System.Data.SQLite.EF6 assembly.  In that file, it's called
IsStoreGenerated, which was probably the previous name for that information.

The change on trunk may fix the issue.  Please let us know.

anonymous added on 2014-05-17 10:29:48:
Same error at the same point during edmx generation. Is there any other information that I can provide to make troubleshooting this easier?

"String was not recognized as a valid Boolean.Couldn't store <0> in IsServerGenerated Column.  Expected type is Boolean."

mistachkin added on 2014-05-17 17:01:46:
Apparently, the same changes are necessary for the other metadata files as well.
Please try again from the trunk.

anonymous added on 2014-05-18 03:16:28:
Same error still.

A System.ArgumentException was thrown: "String was not recognized as a valid Boolean.Couldn't store <0> in IsServerGenerated Column.  Expected type is Boolean."
A System.FormatException was thrown: "String was not recognized as a valid Boolean."

Call stack:
System.Data.dll!Set System.Data.DataColumn.Item(int record = {unknown}, object value = {unknown})	C#
System.Data.dll!System.Data.DataTable.NewRecordFromArray(object[] value = {unknown})	C#
System.Data.dll!System.Data.DataRowCollection.Add(object[] values = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.SsdlGenerator.EntityStoreSchemaGeneratorDatabaseSchemaLoader.LoadDataTable(string sql = {unknown}, System.Func<System.Collections.Generic.IEnumerable<System.Data.DataRow>,System.Collections.Generic.IEnumerable<System.Data.DataRow>> orderByFunc = {unknown}, System.Data.DataTable table = {unknown}, System.Data.Entity.Design.EntityStoreSchemaFilterObjectTypes queryTypes = {unknown}, System.Collections.Generic.IEnumerable<System.Data.Entity.Design.EntityStoreSchemaFilterEntry> filters = {unknown}, string[] filterAliases = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.SsdlGenerator.EntityStoreSchemaGeneratorDatabaseSchemaLoader.LoadTableDetails(System.Collections.Generic.IEnumerable<System.Data.Entity.Design.EntityStoreSchemaFilterEntry> filters = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.EntityStoreSchemaGenerator.CreateTableEntityTypes(LoadMethodSessionState session = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.EntityStoreSchemaGenerator.DoGenerateStoreMetadata(System.Collections.Generic.IEnumerable<System.Data.Entity.Design.EntityStoreSchemaFilterEntry> filters = {unknown}, System.Version targetEntityFrameworkVersion = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.EntityStoreSchemaGenerator.GenerateStoreMetadata(System.Collections.Generic.IEnumerable<System.Data.Entity.Design.EntityStoreSchemaFilterEntry> filters = {unknown}, System.Version targetEntityFrameworkVersion = {unknown})	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.Ssdl.DatabaseConnectionSsdlWriter.GenerateStoreSchemaMetadata(Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderSettings modelBuilderSettings = {unknown}, System.Version schemaVersion = {unknown}, string storageNamespace = {unknown}, out System.Data.Entity.Design.EntityStoreSchemaGenerator entityStoreSchemaGenerator = {unknown}, out System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> ssdlErrors = {unknown})	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.Ssdl.DatabaseConnectionSsdlWriter.WriteSsdl(System.Xml.Linq.XDocument edmxDocument = {unknown}, System.Uri modelUri = {unknown}, Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderSettings modelSettings = {unknown}, System.Xml.XmlWriterSettings xmlWriterSettings = {unknown}, System.Version schemaVersion = {unknown}, System.Diagnostics.Stopwatch generatingModelWatch = {unknown}, out System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> ssdlErrors = {unknown})	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModel()	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.WizardPageSelectTables.GenerateModel(Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.ModelBuilderWizardForm wizard = {unknown})	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.WizardPageSelectTables.OnWizardFinish()	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.ModelBuilderWizardForm.OnFinish()	C#
Microsoft.WizardFramework.dll!Microsoft.WizardFramework.WizardForm.OnFinishClicked(object sender = {unknown}, System.EventArgs e = {unknown})	C#
Microsoft.WizardFramework.dll!Microsoft.WizardFramework.NavigationButtonBar.OnFinish(object sender = {unknown}, System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m = {unknown}, System.Windows.Forms.MouseButtons button = {unknown}, int clicks = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd = {unknown}, int msg = {unknown}, System.IntPtr wparam = {unknown}, System.IntPtr lparam = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.LocalModalMessageLoop(System.Windows.Forms.Form form = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.RunMessageLoopInner(int reason = {unknown}, System.Windows.Forms.ApplicationContext context = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.RunMessageLoop(int reason = {unknown}, System.Windows.Forms.ApplicationContext context = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog()	C#
Microsoft.WizardFramework.dll!Microsoft.WizardFramework.WizardForm.Start(System.Windows.Forms.IWin32Window parent = {unknown})	C#
Microsoft.WizardFramework.dll!Microsoft.WizardFramework.WizardForm.Start()	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.ModelObjectItemWizard.RunStarted(object automationObject = {unknown}, System.Collections.Generic.Dictionary<string,string> replacementsDictionary = {unknown}, Microsoft.VisualStudio.TemplateWizard.WizardRunKind runKind = {unknown}, object[] customParams = {unknown})	C#
Microsoft.VisualStudio.TemplateWizard.dll!Microsoft.VisualStudio.TemplateWizard.Wizard.Execute(object application = {unknown}, int hwndOwner = {unknown}, ref object[] ContextParams = {unknown}, ref object[] CustomParams = {unknown}, ref EnvDTE.wizardResult retval = {unknown})	C#
Microsoft.Data.Entity.Design.DataSourceWizardExtension.dll!Microsoft.Data.Entity.Design.DataSourceWizardExtension.LaunchModelGenWizardPage.LaunchEntityDesignerWizard(Microsoft.Data.Entity.Design.DataSourceWizardExtension.EdmDataSourceWizardData wizardData = {unknown})	C#
Microsoft.Data.Entity.Design.DataSourceWizardExtension.dll!Microsoft.Data.Entity.Design.DataSourceWizardExtension.LaunchWizardPageBase.OnEnteredPage(System.EventArgs e = {unknown})	C#
Microsoft.VisualStudio.WizardFramework.dll!Microsoft.VSWizards.WizardPage.RaiseEnteredPage()	C#
Microsoft.VisualStudio.WizardFramework.dll!Microsoft.VSWizards.WizardForm.NextPage()	C#
Microsoft.VisualStudio.WizardFramework.dll!Microsoft.VSWizards.WizardForm.Next_Click(object sender = {unknown}, System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m = {unknown}, System.Windows.Forms.MouseButtons button = {unknown}, int clicks = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd = {unknown}, int msg = {unknown}, System.IntPtr wparam = {unknown}, System.IntPtr lparam = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.LocalModalMessageLoop(System.Windows.Forms.Form form = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.RunMessageLoopInner(int reason = {unknown}, System.Windows.Forms.ApplicationContext context = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.RunMessageLoop(int reason = {unknown}, System.Windows.Forms.ApplicationContext context = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner = {unknown})	C#
Microsoft.VisualStudio.dll!Microsoft.VisualStudio.UIService.System.Windows.Forms.Design.IUIService.ShowDialog(System.Windows.Forms.Form form = {unknown})	C#
Microsoft.VisualStudio.WizardFramework.dll!Microsoft.VSWizards.WizardForm.ShowDialog()	C#
Microsoft.VSDesigner.dll!Microsoft.VSDesigner.DataSource.ProjectDataSourceUtil.AddDataSource(System.IServiceProvider serviceProvider = {unknown}, EnvDTE.Project project = {unknown}, LaunchedFrom launchedFrom = {unknown})	C#
Microsoft.VSDesigner.dll!Microsoft.VSDesigner.DataFieldPicker.DataFieldPickerToolWindow.AddNewDataSource(LaunchedFrom launchedFrom = {unknown})	C#
Microsoft.VSDesigner.dll!Microsoft.VSDesigner.VSDMenus.OnAddNewDbFromToolWindow(object sender = {unknown}, System.EventArgs e = {unknown})	C#
System.dll!System.ComponentModel.Design.MenuCommand.Invoke()	C#
System.dll!System.ComponentModel.Design.MenuCommand.Invoke(object arg = {unknown})	C#
Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.Shell.OleMenuCommandService.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(ref System.Guid guidGroup = {unknown}, uint nCmdId = {unknown}, uint nCmdExcept = {unknown}, System.IntPtr pIn = {unknown}, System.IntPtr vOut = {unknown})	C#
Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(ref System.Guid guidGroup = {unknown}, uint nCmdId = {unknown}, uint nCmdExcept = {unknown}, System.IntPtr pIn = {unknown}, System.IntPtr vOut = {unknown})	C#
Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.DataSource.Invoke(string verb = {unknown}, object pvaIn = {unknown}, out object pvaOut = {unknown})	C#
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.VsCommand.Execute(object parameter = {unknown})	C#
PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource commandSource = {unknown}, bool userInitiated = {unknown})	C#
PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.ExecuteCommandSource(System.Windows.Input.ICommandSource commandSource = {unknown})	C#
PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnClick()	C#
PresentationFramework.dll!System.Windows.Controls.Button.OnClick()	C#
PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.OnMouseLeftButtonUpThunk(object sender = {unknown}, System.Windows.Input.MouseButtonEventArgs e = {unknown})	C#
PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler = {unknown}, object genericTarget = {unknown})	C#
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler = {unknown}, object target = {unknown})	C#
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target = {unknown}, System.Windows.RoutedEventArgs routedEventArgs = {unknown})	C#
PresentationCore.dll!System.Windows.RouteItem.InvokeHandler(System.Windows.RoutedEventArgs routedEventArgs = {unknown})	C#
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source = {unknown}, System.Windows.RoutedEventArgs args = {unknown}, bool reRaised = {unknown})	C#
PresentationCore.dll!System.Windows.EventRoute.ReInvokeHandlers(object source = {unknown}, System.Windows.RoutedEventArgs args = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender = {unknown}, System.Windows.RoutedEventArgs args = {unknown}, System.Windows.RoutedEvent newEvent = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(System.Windows.DependencyObject sender = {unknown}, System.Windows.Input.MouseButtonEventArgs e = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.OnMouseUpThunk(object sender = {unknown}, System.Windows.Input.MouseButtonEventArgs e = {unknown})	C#
PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler = {unknown}, object genericTarget = {unknown})	C#
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler = {unknown}, object target = {unknown})	C#
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target = {unknown}, System.Windows.RoutedEventArgs routedEventArgs = {unknown})	C#
PresentationCore.dll!System.Windows.RouteItem.InvokeHandler(System.Windows.RoutedEventArgs routedEventArgs = {unknown})	C#
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source = {unknown}, System.Windows.RoutedEventArgs args = {unknown}, bool reRaised = {unknown})	C#
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlers(object source = {unknown}, System.Windows.RoutedEventArgs args = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender = {unknown}, System.Windows.RoutedEventArgs args = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs args = {unknown}, bool trusted = {unknown})	C#
PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea()	C#
PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input = {unknown})	C#
PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport = {unknown})	C#
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd = {unknown}, System.Windows.Input.InputMode mode = {unknown}, int timestamp = {unknown}, System.Windows.Input.RawMouseActions actions = {unknown}, int x = {unknown}, int y = {unknown}, int wheel = {unknown})	C#
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd = {unknown}, MS.Internal.Interop.WindowMessage msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown}, ref bool handled = {unknown})	C#
PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd = {unknown}, int msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown}, ref bool handled = {unknown})	C#
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = {unknown}, int msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown}, ref bool handled = {unknown})	C#
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {unknown}, object args = {unknown}, int numArgs = {unknown})	C#
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source = {unknown}, System.Delegate method = {unknown}, object args = {unknown}, int numArgs = {unknown}, System.Delegate catchHandler = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {unknown}, System.Delegate callback = {unknown}, object args = {unknown}, int numArgs = {unknown}, System.Delegate catchHandler = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate callback = {unknown}, object args = {unknown}, int numArgs = {unknown}, System.Delegate catchHandler = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority = {unknown}, System.TimeSpan timeout = {unknown}, System.Delegate method = {unknown}, object args = {unknown}, int numArgs = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority priority = {unknown}, System.Delegate method = {unknown}, object arg = {unknown})	C#
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = {unknown}, int msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown})	C#




Another exception that is thrown during the model designer wizard:
A System.Data.ProviderIncompatibleException was caught: "SQLite does not support this information type 'StoreSchemaDefinitionVersion3'."
A System.Data.ProviderIncompatibleException was thrown: "The store data provider failed to return information for the StoreSchemaDefinitionVersion3 request. See the inner exception for details."

SQLiteProviderManifest.cs, line 69:
    /// <summary>
    /// Returns manifest information for the provider
    /// </summary>
    /// <param name="informationType">The name of the information to be retrieved.</param>
    /// <returns>An XmlReader at the begining of the information requested.</returns>
    protected override XmlReader GetDbInformation(string informationType)
    {
      if (informationType == DbProviderManifest.StoreSchemaDefinition)
        return GetStoreSchemaDescription();
      else if (informationType == DbProviderManifest.StoreSchemaMapping)
        return GetStoreSchemaMapping();
      else if (informationType == DbProviderManifest.ConceptualSchemaDefinition)
        return null;

-->   throw new ProviderIncompatibleException(String.Format("SQLite does not support this information type '{0}'.", informationType));
    }

Stack trace:
System.Data.SQLite.Linq.dll!System.Data.SQLite.Linq.SQLiteProviderManifest.GetDbInformation(string informationType = "StoreSchemaDefinitionVersion3")	C#
System.Data.Entity.dll!System.Data.Common.DbProviderManifest.GetInformation(string informationType = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.EntityStoreSchemaGenerator.GetProviderSchemaMetadataWorkspace(System.Data.Common.DbProviderServices providerServices = {unknown}, System.Data.Common.DbConnection providerConnection = {unknown}, System.Version targetEntityFrameworkVersion = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.EntityStoreSchemaGenerator.CreateStoreSchemaConnection(string providerInvariantName = {unknown}, string connectionString = {unknown}, System.Version targetEntityFrameworkVersion = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.SsdlGenerator.EntityStoreSchemaGeneratorDatabaseSchemaLoader.CreateStoreSchemaConnection(string providerInvariantName = {unknown}, string connectionString = {unknown}, out System.Version storeSchemaModelVersion = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.SsdlGenerator.EntityStoreSchemaGeneratorDatabaseSchemaLoader..ctor(string providerInvariantName = {unknown}, string connectionString = {unknown})	C#
System.Data.Entity.Design.dll!System.Data.Entity.Design.EntityStoreSchemaGenerator..ctor(string providerInvariantName = {unknown}, string connectionString = {unknown}, string namespaceName = {unknown})	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.Ssdl.DatabaseConnectionSsdlWriter.GenerateStoreSchemaMetadata(Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderSettings modelBuilderSettings = {unknown}, System.Version schemaVersion = {unknown}, string storageNamespace = {unknown}, out System.Data.Entity.Design.EntityStoreSchemaGenerator entityStoreSchemaGenerator = {unknown}, out System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> ssdlErrors = {unknown})	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.Ssdl.DatabaseConnectionSsdlWriter.WriteSsdl(System.Xml.Linq.XDocument edmxDocument = {unknown}, System.Uri modelUri = {unknown}, Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderSettings modelSettings = {unknown}, System.Xml.XmlWriterSettings xmlWriterSettings = {unknown}, System.Version schemaVersion = {unknown}, System.Diagnostics.Stopwatch generatingModelWatch = {unknown}, out System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> ssdlErrors = {unknown})	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModel()	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.WizardPageSelectTables.GenerateModel(Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.ModelBuilderWizardForm wizard = {unknown})	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.WizardPageSelectTables.OnWizardFinish()	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Gui.ModelBuilderWizardForm.OnFinish()	C#
Microsoft.WizardFramework.dll!Microsoft.WizardFramework.WizardForm.OnFinishClicked(object sender = {unknown}, System.EventArgs e = {unknown})	C#
Microsoft.WizardFramework.dll!Microsoft.WizardFramework.NavigationButtonBar.OnFinish(object sender = {unknown}, System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m = {unknown}, System.Windows.Forms.MouseButtons button = {unknown}, int clicks = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd = {unknown}, int msg = {unknown}, System.IntPtr wparam = {unknown}, System.IntPtr lparam = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.LocalModalMessageLoop(System.Windows.Forms.Form form = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.RunMessageLoopInner(int reason = {unknown}, System.Windows.Forms.ApplicationContext context = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.RunMessageLoop(int reason = {unknown}, System.Windows.Forms.ApplicationContext context = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog()	C#
Microsoft.WizardFramework.dll!Microsoft.WizardFramework.WizardForm.Start(System.Windows.Forms.IWin32Window parent = {unknown})	C#
Microsoft.WizardFramework.dll!Microsoft.WizardFramework.WizardForm.Start()	C#
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.ModelObjectItemWizard.RunStarted(object automationObject = {unknown}, System.Collections.Generic.Dictionary<string,string> replacementsDictionary = {unknown}, Microsoft.VisualStudio.TemplateWizard.WizardRunKind runKind = {unknown}, object[] customParams = {unknown})	C#
Microsoft.VisualStudio.TemplateWizard.dll!Microsoft.VisualStudio.TemplateWizard.Wizard.Execute(object application = {unknown}, int hwndOwner = {unknown}, ref object[] ContextParams = {unknown}, ref object[] CustomParams = {unknown}, ref EnvDTE.wizardResult retval = {unknown})	C#
Microsoft.Data.Entity.Design.DataSourceWizardExtension.dll!Microsoft.Data.Entity.Design.DataSourceWizardExtension.LaunchModelGenWizardPage.LaunchEntityDesignerWizard(Microsoft.Data.Entity.Design.DataSourceWizardExtension.EdmDataSourceWizardData wizardData = {unknown})	C#
Microsoft.Data.Entity.Design.DataSourceWizardExtension.dll!Microsoft.Data.Entity.Design.DataSourceWizardExtension.LaunchWizardPageBase.OnEnteredPage(System.EventArgs e = {unknown})	C#
Microsoft.VisualStudio.WizardFramework.dll!Microsoft.VSWizards.WizardPage.RaiseEnteredPage()	C#
Microsoft.VisualStudio.WizardFramework.dll!Microsoft.VSWizards.WizardForm.NextPage()	C#
Microsoft.VisualStudio.WizardFramework.dll!Microsoft.VSWizards.WizardForm.Next_Click(object sender = {unknown}, System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m = {unknown}, System.Windows.Forms.MouseButtons button = {unknown}, int clicks = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Button.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd = {unknown}, int msg = {unknown}, System.IntPtr wparam = {unknown}, System.IntPtr lparam = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.LocalModalMessageLoop(System.Windows.Forms.Form form = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.RunMessageLoopInner(int reason = {unknown}, System.Windows.Forms.ApplicationContext context = {unknown})	C#
System.Windows.Forms.dll!ThreadContext.RunMessageLoop(int reason = {unknown}, System.Windows.Forms.ApplicationContext context = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form = {unknown})	C#
System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner = {unknown})	C#
Microsoft.VisualStudio.dll!Microsoft.VisualStudio.UIService.System.Windows.Forms.Design.IUIService.ShowDialog(System.Windows.Forms.Form form = {unknown})	C#
Microsoft.VisualStudio.WizardFramework.dll!Microsoft.VSWizards.WizardForm.ShowDialog()	C#
Microsoft.VSDesigner.dll!Microsoft.VSDesigner.DataSource.ProjectDataSourceUtil.AddDataSource(System.IServiceProvider serviceProvider = {unknown}, EnvDTE.Project project = {unknown}, LaunchedFrom launchedFrom = {unknown})	C#
Microsoft.VSDesigner.dll!Microsoft.VSDesigner.DataFieldPicker.DataFieldPickerToolWindow.AddNewDataSource(LaunchedFrom launchedFrom = {unknown})	C#
Microsoft.VSDesigner.dll!Microsoft.VSDesigner.VSDMenus.OnAddNewDbFromToolWindow(object sender = {unknown}, System.EventArgs e = {unknown})	C#
System.dll!System.ComponentModel.Design.MenuCommand.Invoke()	C#
System.dll!System.ComponentModel.Design.MenuCommand.Invoke(object arg = {unknown})	C#
Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.Shell.OleMenuCommandService.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(ref System.Guid guidGroup = {unknown}, uint nCmdId = {unknown}, uint nCmdExcept = {unknown}, System.IntPtr pIn = {unknown}, System.IntPtr vOut = {unknown})	C#
Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(ref System.Guid guidGroup = {unknown}, uint nCmdId = {unknown}, uint nCmdExcept = {unknown}, System.IntPtr pIn = {unknown}, System.IntPtr vOut = {unknown})	C#
Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.DataSource.Invoke(string verb = {unknown}, object pvaIn = {unknown}, out object pvaOut = {unknown})	C#
Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.VsCommand.Execute(object parameter = {unknown})	C#
PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource commandSource = {unknown}, bool userInitiated = {unknown})	C#
PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.ExecuteCommandSource(System.Windows.Input.ICommandSource commandSource = {unknown})	C#
PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnClick()	C#
PresentationFramework.dll!System.Windows.Controls.Button.OnClick()	C#
PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.OnMouseLeftButtonUpThunk(object sender = {unknown}, System.Windows.Input.MouseButtonEventArgs e = {unknown})	C#
PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler = {unknown}, object genericTarget = {unknown})	C#
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler = {unknown}, object target = {unknown})	C#
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target = {unknown}, System.Windows.RoutedEventArgs routedEventArgs = {unknown})	C#
PresentationCore.dll!System.Windows.RouteItem.InvokeHandler(System.Windows.RoutedEventArgs routedEventArgs = {unknown})	C#
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source = {unknown}, System.Windows.RoutedEventArgs args = {unknown}, bool reRaised = {unknown})	C#
PresentationCore.dll!System.Windows.EventRoute.ReInvokeHandlers(object source = {unknown}, System.Windows.RoutedEventArgs args = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender = {unknown}, System.Windows.RoutedEventArgs args = {unknown}, System.Windows.RoutedEvent newEvent = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(System.Windows.DependencyObject sender = {unknown}, System.Windows.Input.MouseButtonEventArgs e = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.OnMouseUpThunk(object sender = {unknown}, System.Windows.Input.MouseButtonEventArgs e = {unknown})	C#
PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler = {unknown}, object genericTarget = {unknown})	C#
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler = {unknown}, object target = {unknown})	C#
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target = {unknown}, System.Windows.RoutedEventArgs routedEventArgs = {unknown})	C#
PresentationCore.dll!System.Windows.RouteItem.InvokeHandler(System.Windows.RoutedEventArgs routedEventArgs = {unknown})	C#
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source = {unknown}, System.Windows.RoutedEventArgs args = {unknown}, bool reRaised = {unknown})	C#
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlers(object source = {unknown}, System.Windows.RoutedEventArgs args = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender = {unknown}, System.Windows.RoutedEventArgs args = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args = {unknown})	C#
PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs args = {unknown}, bool trusted = {unknown})	C#
PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea()	C#
PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input = {unknown})	C#
PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport = {unknown})	C#
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd = {unknown}, System.Windows.Input.InputMode mode = {unknown}, int timestamp = {unknown}, System.Windows.Input.RawMouseActions actions = {unknown}, int x = {unknown}, int y = {unknown}, int wheel = {unknown})	C#
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd = {unknown}, MS.Internal.Interop.WindowMessage msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown}, ref bool handled = {unknown})	C#
PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd = {unknown}, int msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown}, ref bool handled = {unknown})	C#
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = {unknown}, int msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown}, ref bool handled = {unknown})	C#
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {unknown}, object args = {unknown}, int numArgs = {unknown})	C#
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source = {unknown}, System.Delegate method = {unknown}, object args = {unknown}, int numArgs = {unknown}, System.Delegate catchHandler = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {unknown}, System.Delegate callback = {unknown}, object args = {unknown}, int numArgs = {unknown}, System.Delegate catchHandler = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate callback = {unknown}, object args = {unknown}, int numArgs = {unknown}, System.Delegate catchHandler = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority = {unknown}, System.TimeSpan timeout = {unknown}, System.Delegate method = {unknown}, object args = {unknown}, int numArgs = {unknown})	C#
WindowsBase.dll!System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority priority = {unknown}, System.Delegate method = {unknown}, object arg = {unknown})	C#
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = {unknown}, int msg = {unknown}, System.IntPtr wParam = {unknown}, System.IntPtr lParam = {unknown})	C#

mistachkin added on 2014-05-18 04:22:36:
Ok, so the previous two check-ins do not fix the issue, moved off trunk.  I think
I understand what is going on now.

The "0" value that cannot be converted [from a string to a boolean] is probably
coming from the "0 as [IsStoreGenerated]" fragment in the SSDL; however, since
the value is used without having a declared type, it is being mapped to "String"
via the DefaultDbType or DefaultTypeName connection property.

There are several possible solutions to this issue, all of which involve
enhancing System.Data.SQLite to work around the somewhat fragile concept
of boolean values presented by the .NET Framework [and/or the Entity
Framework].  I'd suspected that this might be the case; however, I was
hoping for a simpler solution.

mistachkin added on 2014-05-18 07:22:21:
Some experimental changes are now on the [/timeline?r=tkt-3c00ec5b52] branch.

In order to make use of them, you'll need to either set the MapTextToAffinity
connection flag (i.e. via the connection string) -OR- modify your local copy of
the source code to change the value of MapTextToAffinity to zero.

anonymous added on 2014-05-18 09:14:39:
I'm sad to say the same issue still persists with those experimental changes. I've not been successful in tracing the exception back to the System.Data.SQLite assembly so that call stack is all I have.

mistachkin added on 2014-05-18 17:09:42:
In order to help track this down, it would be useful to enable logging of SQL
statements.  Generally, this is done by calling the SQLiteLog.Initialize method
as soon as possible and making sure the SQLiteConnectionFlags.LogPrepare flag is
set on the connection(s).  The easiest way to do that without relying on being
able to set the connection string is to change the value of the LogPrepare flag
to zero in the source code and recompile.

mistachkin added on 2014-05-27 05:20:58:
I've been able to reproduce the problem locally using manual testing.

mistachkin added on 2014-05-27 06:05:56:
I think the latest changes on the [/timeline?r=tkt-3c00ec5b52] branch will now
avoid the previous exceptions if the DetectTextAffinity and DetectStringType
connection flags are used.

The connection flags for use by the various Visual Studio subsystems (including
the Entity Framework) can be set via the "Advanced" SQLite connection dialog.
This dialog can be accessed by clicking the "Advanced" button from the primary
SQLite connection dialog, which is accessed via the "Data Connections" item in
the "Server Explorer" window.

mistachkin added on 2014-05-27 18:11:05:
The changes I mentioned last night appear to work for your use case.  This has
been verified via manual testing using Visual Studio 2012 on Windows 8 64-bit.

Please test these changes in your environment and let us know if they work for
you.