On Wed, 2010-01-27 at 02:14 -0800, Matthijs de Z wrote:
> after that, I created a new c# program added DbLinq, DbLinq.MySql and
> MySql.Data to the references and added dblinqclass.cs to the project.
> Unfortunately I got some errors.
>
> "Error 1 The type or namespace name 'MappingSource' could not be
> found
> (are you missing a using directive or an assembly reference?) C:
> \Documents and Settings\matthijs\My Documents\Visual Studio
> 2008\Projects\dblinq tests\projects
> \dblinqtest1\dblinqtest1\dblinqclass.cs 52 40 dblinqtest1
> "
You need to add a reference to System.Data.Linq.dll (included in .NET
3.5 and/or VS 2008).
> and
>
> "Error 3 The type or namespace name 'IVendor' could not be found
> (are
> you missing a using directive or an assembly reference?) C:\Documents
> and Settings\matthijs\My Documents\Visual Studio 2008\Projects\dblinq
> tests\projects\dblinqtest1\dblinqtest1\dblinqclass.cs 65 47
> dblinqtest1
> "
Odd; Very, very odd.
Your source code is missing a 'using DbLinq.Vendor;' declaration.
However, I don't know *why* you're missing that. Your attached file
clearly shows the presence of '#if MONO_STRICT' blocks, but it's lacking
one in the toplevel section; see e.g.
http://dblinq2007.googlecode.com/svn/trunk/tests/Northwind.Expected.Sqlite-DbMetal.cs
Where there is:
#if MONO_STRICT
using System.Data.Linq;
#else // MONO_STRICT
using DbLinq.Data.Linq;
using DbLinq.Vendor;
#endif // MONO_STRICT
Your file is missing this, and I don't know why. :-/
Creating entities for a local SQL Server instance results in the
expected MONO_STRICT blocks, and afaik this isn't vendor-specific, so
you should have them (yet curiously do not).
Did you manually edit the file?
> "Error 7 The type or namespace name 'TableAttribute' could not be
> found (are you missing a using directive or an assembly reference?) C:
> \Documents and Settings\matthijs\My Documents\Visual Studio
> 2008\Projects\dblinq tests\projects
> \dblinqtest1\dblinqtest1\dblinqclass.cs 84 3 dblinqtest1
> "
TableAttribute is in System.Data.Linq.dll.
> "Error 8 The type or namespace name 'Column' could not be found
> (are
> you missing a using directive or an assembly reference?) C:\Documents
> and Settings\matthijs\My Documents\Visual Studio 2008\Projects\dblinq
> tests\projects\dblinqtest1\dblinqtest1\dblinqclass.cs 132 4
> dblinqtest1
> "
Ditto.
> "Error 9 The type or namespace name 'ColumnAttribute' could not
> be
> found (are you missing a using directive or an assembly reference?) C:
> \Documents and Settings\matthijs\My Documents\Visual Studio
> 2008\Projects\dblinq tests\projects
> \dblinqtest1\dblinqtest1\dblinqclass.cs 132 4 dblinqtest1
> "
Ditto.
> Am I missing a reference? Or do I need to do something else. I googled
> around and cannot find what the problem is. Maybe you know?
Yes, you're missing System.Data.Linq.dll. :-)
- Jon
--
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en.