473,322 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

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
2 4037
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matora Nickolay | last post by:
Hello. My program has to use third party components located in several external libraries. Those components, also as my program, are usually been changed. The problem is to make my program use...
8
by: Xah Lee | last post by:
what does it mean when a style tag gives something like the following? <style type="text/css" media="screen,projection">/*<!]>*/</style> is this standard? Xah xah@xahlee.org ∑...
0
by: test.file | last post by:
We have an application that is running under Citrix. The application files are located on a shared network drive and the app is launched via UNC. The app contains WinForms that are called from...
6
by: Plamen Doykov | last post by:
Hi all I have converted a simple project from ASP.NET 1 to 2.0 with the latest prerelease of Visual Studio 2005. The problem is I can't access internal members from the code behind. It gives:...
0
by: John Wright | last post by:
I am trying to load external assemblies that are exe files. I need some help creating an appdomain and loading the assembly. I also want to execute a function on the external assembly to pass...
9
by: DrBonzo | last post by:
In order to get events back from a DCOM server (an embedded device running Windows CE), I seem to have to turn off security for my process. To do this, I'm saying: int ret =...
12
by: Steve | last post by:
I have a database that raises an error when you try to open it and it doesn't open. Trying to open the database with the OpenDatabase method raises the same error. Trying to import any objects...
1
by: madbat87 | last post by:
Hi, I'm trying to import code from a c++ unmanaged dll in a c# project. In the dll there's a class named Connection, but the dll exposes only 2 methods (outside the class): - HBITMAP...
1
by: neoupadhyay | last post by:
External component has thrown an exception. C:\Program Files\Microsoft Visual Studio 8\Common7\IDE> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output...
2
by: =?Utf-8?B?Unlhbg==?= | last post by:
I am using vb.net to launch an external application (.exe); how do I capture this external applications's version number in my vb.net app?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.