Link to home
Start Free TrialLog in
Avatar of rperryman
rperrymanFlag for United States of America

asked on

Need help resolving CS0246 Compilation Error

Hi Experts,

I have a .NET website that is approximately 25GB in size and becaus of this I do not have a full local copy for testing purposes.  I need to add a DLL that connects to a webservice.  And then reference the webservice and use it in a new page.  I need to do this by hand and not publish through .NET.

When I try it fails and I get a CS0246 Error message (missing reference).  Basically I'm trying to add a single page with code behind to a website by hand.  This is what I've done:

1. Checked Spelling - it's all good
2. Added a using statement (the using statement is where it is failing!)
3. Added a <@ Register Assembly statement to the page
4. Put the dll in the BIN folder
5. Checked that it is an application - I have other DLL's and they are working

Any other ideas.... is there somewhere else I have to tell the application that the DLL is usable?

Avatar of guru_sami
guru_sami
Flag of United States of America image

You might want to try adding assembly reference in web.config compilation section like sample below:

<compilation>
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
Any chance that a different version of the DLL is being referenced already?
ASKER CERTIFIED SOLUTION
Avatar of rperryman
rperryman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial