Solved

Need help resolving CS0246 Compilation Error

Posted on 2010-09-22
3
592 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
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:Slimfinger
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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

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…
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 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