473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

APP_CODE directory and Conversion to VS 2005

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
Oct 15 '07 #1
5 2986
Randy,

Why not move the code file from the main directory to the APP_CODE
directory as well?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Randy" <te**@temp.comwrote in message
news:u$**************@TK2MSFTNGP02.phx.gbl...
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

Oct 15 '07 #2
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

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:OF**************@TK2MSFTNGP06.phx.gbl...
Randy,

Why not move the code file from the main directory to the APP_CODE
directory as well?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Randy" <te**@temp.comwrote in message
news:u$**************@TK2MSFTNGP02.phx.gbl...
>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


Oct 15 '07 #3
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.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:OF**************@TK2MSFTNGP06.phx.gbl...
Randy,

Why not move the code file from the main directory to the APP_CODE
directory as well?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Randy" <te**@temp.comwrote in message
news:u$**************@TK2MSFTNGP02.phx.gbl...
>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


Oct 15 '07 #4
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.

--
Ignacio Machin
www.laceupsolutions.com
Mobile & warehouse Solutions.
"Randy" <te**@temp.comwrote in message
news:u$**************@TK2MSFTNGP02.phx.gbl...
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

Oct 15 '07 #5
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
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.comwrote in
message news:%2****************@TK2MSFTNGP06.phx.gbl...
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.

--
Ignacio Machin
www.laceupsolutions.com
Mobile & warehouse Solutions.
"Randy" <te**@temp.comwrote in message
news:u$**************@TK2MSFTNGP02.phx.gbl...
>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


Oct 15 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: AZ | last post by:
During the Pre-compile process of an ASP.Net 2.0 app, it compiles the code-behind & optionally the presentation files into an assembly named App_Code.dll. Can that not be renamed to a more project...
11
by: Steve Franks | last post by:
I'm using VS.NET 2005 Beta 2. I have a helper C# class I wrote that I placed in my /App_Code directory. Everything runs fine locally. However when I use the "Copy Web" function to upload the site...
4
by: paul | last post by:
Hi, Im trying to add a dataset to the app_code directory using vs2005 \ SQL2005 beta 2. When I run through the wizard I select the option to auto create new Stored Procedures (Select, update,...
5
by: jake | last post by:
I've seen many articles that claim the files in the App_Code directory are treated in the same way as aspx-files in ASP 1.1. Well, this does not seem to be the case, at least in Web Developer 2005...
0
by: Dunc | last post by:
I'm trying to convert some ASP.NET projects from 1.1 to 2.0. In the 1.1 version, I used strongly typed datasets a lot, which wont convert. As a workaround, I've created an XSL schema in a seperate...
2
by: pradeep_TP | last post by:
Hello, I am trying to use APP_CODE folder for all my class files under VS 2005. After adding APP_CODE in the solution explorer, I added a new web page by right clicking project and selecting add...
9
by: rn5a | last post by:
Is putting a VB class file in the special directory named App_Code the same as relocating the VB class file from the App_Code directory to another directory & then using the VBC tool, compiling the...
1
by: netasp | last post by:
hi all, when adding a new web form in VS 2003, usually viewing the code behind for that form will let you write any method or function and referencing any web control placed on the form without...
1
by: Frank Miverk | last post by:
Hi, I have a situation which I think is fairly common. 1. Public area 2. Secure area accessed via SSL e.g. MyWebsite/ /MySecureWebsite
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.