By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,558 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,558 IT Pros & Developers. It's quick & easy.

can't import external assembly using single-file asp.net

P: n/a
Hi,

I have a single-file aspx file (no codebehind). when I try to do this:

<%@ Import Namespace="MySql.Data.MySqlClient" %>

I get this:

CS0246: The type or namespace name 'MySql' could not be found (are you
missing a using directive or an assembly reference?)

I have the MySql.Data assembly registered in the gac. Any ideas why it won't
pick it up?

Andy
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You need to add a reference via the:

<%@ Assembly Name="FullyQualifiedAssemblyName" %> directive:

http://msdn.microsoft.com/library/de...onassembly.asp

or specify it in <assemblies> in web.config:

http://msdn.microsoft.com/library/de...assemblies.asp

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I have a single-file aspx file (no codebehind). when I try to do this:

<%@ Import Namespace="MySql.Data.MySqlClient" %>

I get this:

CS0246: The type or namespace name 'MySql' could not be found (are you
missing a using directive or an assembly reference?)

I have the MySql.Data assembly registered in the gac. Any ideas why it
won't pick it up?

Andy


Nov 19 '05 #2

P: n/a
ok, so I have put this in the top of the file

<%@ Assembly Name="MySql.Data" %>

but I just get the error message

File or assembly name MySql.Data, or one of its dependencies, was not found

I'm not sure what you mean by the "fully qualified" assembly name. according
to the documentation I cannot put the path or file extension in the assembly
directive, just the assembly name
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:97**********************@msnews.microsoft.com ...
You need to add a reference via the:

<%@ Assembly Name="FullyQualifiedAssemblyName" %> directive:

http://msdn.microsoft.com/library/de...onassembly.asp

or specify it in <assemblies> in web.config:

http://msdn.microsoft.com/library/de...assemblies.asp

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I have a single-file aspx file (no codebehind). when I try to do this:

<%@ Import Namespace="MySql.Data.MySqlClient" %>

I get this:

CS0246: The type or namespace name 'MySql' could not be found (are you
missing a using directive or an assembly reference?)

I have the MySql.Data assembly registered in the gac. Any ideas why it
won't pick it up?

Andy


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.