Solved

Need help resolving CS0246 Compilation Error

Posted on 2010-09-22
3
589 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
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…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now