1

I get some troubles with a DLL reference.

I have MySql.Data.dll in my bin folder. And I added the reference of this dll to my project.

I can well use classes from this dll (like MySqlConnection, MySqlClient, etc) in aspx.cs but i cannot use it in classes from files from App_Code folder !

For all files situated in App_Code folder (my model classes) , the using MySql.Data; doesn't work. While it works in aspx.cs files.

John Saunders
  • 159,224
  • 26
  • 237
  • 393
dramixx
  • 264
  • 3
  • 15

1 Answers1

3

As you know, there are two types of projects that you can use to create a website in Visual Studio. The App_Code folder works for Web Site projects, but since you stated that you're using a Web Application project, this is causing you problems.

Here's some additional reading on this topic.

In short, I recommend just creating a different (non-built-in) folder to put your random code files in. Name it something like "code", "classes", etc.

John Hodge
  • 1,515
  • 1
  • 11
  • 13