Solved

Need help resolving CS0246 Compilation Error

Posted on 2010-09-22
3
596 Views
Last Modified: 2013-12-16
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?

0
Comment
Question by:rperryman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 33737654
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>
0
 
LVL 7

Expert Comment

by:Bill Nolan
ID: 33745818
Any chance that a different version of the DLL is being referenced already?
0
 

Accepted Solution

by:
rperryman earned 0 total points
ID: 33746671
So i figured it out. The using statement that I added was the name of the DLL. The DLL exposed a different name and I didn't realize there was already a using statement in the file for that DLL. Intellisense picked everything up like it was supposed to in .NET so I thought everything was good. The solution was removing the using statement to the name of the DLL.  *embarrased*
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question