Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy Fish - 22 Jul 2005 09:22 GMT
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
Brock Allen - 22 Jul 2005 14:54 GMT
You need to add a reference via the:

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

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconassembly.asp


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

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/g
ngrfaddelementforassemblies.asp


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

> Hi,
>
[quoted text clipped - 11 lines]
>
> Andy
Andy Fish - 22 Jul 2005 18:17 GMT
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

> You need to add a reference via the:
>
[quoted text clipped - 25 lines]
>>
>> Andy

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.