?
Solved

Type or namespace UserControls not found in RelayWeb

Posted on 2011-05-11
5
Medium Priority
?
561 Views
Last Modified: 2013-11-07
I get the error "The type or namespace name 'UserControls' does not exist in the namespace 'RelayWeb' (are you missing an assembly reference?)" This is an imported existing web project and I have tried adding references to RelayWeb (developed in-house). This ia a ASP.NET with C# 2008 DotNet 3.5 project that was converted from a ASP.NET with C# 2003 DotNet 1.1.

Please refer to screen shot attached.
RelayWeb-And-UserControls.JPG
0
Comment
Question by:Mister_Spock
  • 3
  • 2
5 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 35740784
Can you show the line that generates the error?

As a side note, folders in a .NET project, while most often times do, do not have to represent a namespace. Just because a folder with the same name as a namespace exists does not mean the namespace exists. You'll have to look at the namespace declarations of the affected files to see if the namespaces have been changed.
0
 
LVL 3

Author Comment

by:Mister_Spock
ID: 35741041
The path is http://localhost/RelayV4/RelayWeb/Stub_Aliases_aspx_cs.cs if that helps. It was a project I converted from DotNet 1.1 to DotNet 3.5.
UserControls.JPG
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 35741213
What do the namespace declarations look like in the files you are trying to access within UserControls? Do they have something like:
namespace RelayWeb.UserControls
{
...

Open in new window

0
 
LVL 3

Assisted Solution

by:Mister_Spock
Mister_Spock earned 0 total points
ID: 35742145
Here is what I found:

Stub_Aliases_aspx_cs.cs is located in:        RelayV4\RelayWeb\App_Code\Migrated\Campaign\Stub_Aliases_aspx_cs.cs

It has the Microsoft generated comments as follows:

// This file was generated as part of an ASP.NET 2.0 Web project conversion.
// This code file 'App_Code\Migrated\Campaign\Stub_Aliases_aspx_cs.cs' was created and contains an abstract class
// used as a base class for the class 'Migrated_Aliases' in file 'Campaign\Aliases.aspx.cs'.
// This allows the the base class to be referenced by all code files in your project.

The abstract class mentioned in the comments is:

abstract public class Aliases :  RelayBasePage
{


}



}

The inheritied abstract class (RelayBaseClass) is found in:

RelayV4\RelayWeb\App_Code\Config.cs and the class it inherits is System.Web.UI.Page

public class RelayBasePage : System.Web.UI.Page

The namespace in the RelayV4\RelayWeb\App_Code\Config.cs file creates is RelayWeb.

RelayV4\RelayWeb\CAMPAIGN/Aliases.aspx.cs mentioned in the above comments has the using statement “RelayWeb.UserControls” and that is found just fine. The namespace is RelayWeb.Campaign.

I hope this makes sense.
0
 
LVL 3

Author Closing Comment

by:Mister_Spock
ID: 35800249
Thank you
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

850 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