471,320 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,320 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 2906
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by AZ | last post: by
reply views Thread by Dunc | last post: by
2 posts views Thread by pradeep_TP | last post: by
9 posts views Thread by rn5a | last post: by
1 post views Thread by netasp | last post: by
reply views Thread by rosydwin | last post: by

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.