1

Closed

SqlCeScripting .NET library Namespace issue

description

Greetings Erik,

I have a namespace issue including the SqlCeScripting library in my project. Here's what I did:

1- Added the following DLLs in the Reference: SqlCeScripting.dll, SQLiteScripting.dll and ISqlCeScripting.dll
2- Added the Using statement:
    using ErikEJ.SqlCeScripting;
    using ErikEJ.SQLiteScripting;
In the code, I can access the Objects class without any issue:
        using (IRepository repository = new DB4Repository(@"Data Source=C:\Data\SQLCE\Test\nw40.sdf"))
        {
            IGenerator generator = new Generator4(repository, @"C:\Temp\nwlite.sql");
            generator.ScriptDatabaseToFile(Scope.SchemaDataSQLite);
        }

However, when I build my project, the compiler generates an error only on the Using statements above. The error messages are:

Error 115 The type or namespace name 'ErikEJ' could not be found (are you missing a using directive or an assembly reference?) C:...\MainWindow.xaml.cs 19 7

Error 116 The type or namespace name 'ErikEJ' could not be found (are you missing a using directive or an assembly reference?) C:...\MainWindow.xaml.cs 20 7


Any idea about what's missing? Thanks in advance for your help knowing your busy schedule.
Closed Nov 13, 2015 at 8:20 AM by ErikEJ
The API requires .NET 4.0

comments

ErikEJ wrote Nov 12, 2015 at 5:11 PM

Could you share your solution?

Pmambo wrote Nov 12, 2015 at 5:11 PM

Hi Erik,

I found the issue. I changed the Target Framework Under Project Properties to .NET Framework Client Profile. It was initially on 3.5 because my application will be deployed on Windows XP Virtual machine. Thanks.

Pmambo wrote Nov 12, 2015 at 5:13 PM

Hi Erik,

I found the issue. I changed the Target Framework Under Project Properties to .NET Framework 4 Client Profile. It was initially on 3.5 because my application will be deployed on Windows XP Virtual machine. Thanks.

Pmambo wrote Nov 12, 2015 at 6:03 PM

Hi Erik,

Yes. It seems the DLLs were built with the Framework 4.0 environment. My project selected Framework was on 3.5. So we need to do this:

1- In visual studio C#, click on Project
2-Select Properties (last menu choice)
  1. Click Application Tab
  2. Change the Target Framework for 4.0 Client profile.
Thanks.

Pmambo wrote Nov 12, 2015 at 6:07 PM

But, my problem is not resolved because Windows XP can't work on the .NET Framework 4.0. It needs .NET 3.5 SP1 or below.

Pmambo wrote Nov 12, 2015 at 6:10 PM

Hi Erik,

I it possible to have SqlCeScripting.dll, SQLiteScripting.dll and ISqlCeScripting.dll under .NET framework 5.5? Thanks in advance.

Pmambo wrote Nov 12, 2015 at 9:26 PM

I solved my issue. I finally used the .NET Framework 4.0 client profile, and migrate the XP Plateform to SP3. It works fine now. Thanks.

wrote Nov 13, 2015 at 8:20 AM