?
Solved

Need help resolving CS0246 Compilation Error

Posted on 2010-09-22
3
Medium Priority
?
597 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

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
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 …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

770 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