Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

APP_CODE directory and Conversion to VS 2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Randy - 15 Oct 2007 18:00 GMT
I've converted a VS 2003 project to VS 2005. I have one utility class that
it put in the APP_CODE directory. When I try and compile I'm getting this
error...
Error 1 The type or namespace name 'WelcomeToPFP' could not be found (are
you missing a using directive or an assembly reference?)
C:\Inetpub\wwwroot\PFPApp\App_Code\Utils.cs 19 9

WelcomeToPFP is a class defined in the root directory of the solution.
My question is...I'm drawing a blank as to how to let this Utils class in
the APP_CODE directory know about the WelcomeToPFP class out in the main
solution directory...what is the syntax to correct this?

Thanks
Randy
Nicholas Paldino [.NET/C# MVP] - 15 Oct 2007 18:14 GMT
Randy,

   Why not move the code file from the main directory to the APP_CODE
directory as well?

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> I've converted a VS 2003 project to VS 2005. I have one utility class that
> it put in the APP_CODE directory. When I try and compile I'm getting this
[quoted text clipped - 10 lines]
> Thanks
> Randy
Randy - 15 Oct 2007 18:22 GMT
Nicholas,
I've got about 40 files which make up my solution. After conversion to 2005,
all of them are in the main solution directory. The conversion just put this
one file (Utils class) in the APP_CODE directory, I believe because it is
just a standalone class. In this standalone class (Utils) in the APP_CODE
directory, I'm declaring an object of a class (WelcomeToPFP) which is one of
the files in the main solution directory. I'm thinking it would not be the
correct thing to do to move it (WelcomeToPFP) into the APP_CODE directory
because it would probably create many more compile errors. I just need a way
(syntax) to let this Utils class in the APP_CODE directory see the
'WelcomeToPFP' class in the main solution directory. But I'm not sure of the
syntax to do this.
Thanks

> Randy,
>
[quoted text clipped - 15 lines]
>> Thanks
>> Randy
Randy - 15 Oct 2007 18:25 GMT
Also...I tried moving the Utils.cs file from the APP_CODE directory into the
main solution directory, but then I get many other compile errors because
all the main classes which use this Utils class can't see it then. They for
some reason are expecting it to be in the APP_CODE directory.

> Randy,
>
[quoted text clipped - 15 lines]
>> Thanks
>> Randy
Ignacio Machin ( .NET/ C# MVP ) - 15 Oct 2007 18:55 GMT
Hi,

Did you convert it to a web APP or a web SITE?

The main difference is that the latter the namespaces are created for you,
This in theory should makes it easier to develop, IMHO it's a pain in the
a... !
Convert it to a web app instead, You have to download the SP1 of VS IIRC.

Signature

Ignacio Machin
www.laceupsolutions.com
Mobile & warehouse Solutions.

> I've converted a VS 2003 project to VS 2005. I have one utility class that
> it put in the APP_CODE directory. When I try and compile I'm getting this
[quoted text clipped - 10 lines]
> Thanks
> Randy
Randy - 15 Oct 2007 19:13 GMT
I removed it and reconverted it from a backup. This time I did the "Convert
to Web App" (I think it was) which I didn't do last time. It put everything
in the main solution directory this time and it all compiles. So...it
appears solved...Thanks

> Hi,
>
[quoted text clipped - 19 lines]
>> Thanks
>> Randy

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.