By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,082 Members | 2,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,082 IT Pros & Developers. It's quick & easy.

how to put the code files where you want?

P: n/a
Hi,

Can someone give me a set of steps for an ASP.NET project (well actually its
just a
VB.NET class DLL that implements HttpHandler) that will work when moved
to another developers machine?

Here are some specifics:

1) The code, project/solution files are in MS Visual Source Safe
2) Developer X gets the files into a directory (recursively building any
folder structure)
3) Opens solution or project (doesn't matter which) --- $%&*^ - BANG

Depending on which developer does it one or more of the problems arise:

1) VS.NET 2003 copies all the files to the wwwroot !! - NO this is plain
wrong and ugly.
2) A vritual directory has already been setup and pointing to the directory
where the
VSS files were put (as is needed) and it asks for a URL the usual
http://localhost/[virtualrootname] is entered but it says that the
project already exists.

God damn it!
Why is it so bloody hard to create a web project where the files are located
where
you want!!

I love .NET but at least in VB6 webclasses you could put the files where you
liked
the only restriction being that the project file had to be in the virtual
root. Now it
is one big massive headache.

So repeating initial question:
Can anybody give me a step-by-step guide so that the following
conditions are met:
1) All code files are in a developer specified location NOT in
c:\inetpub\wwwroot.
We're using VSS but I like my files to be backed up overnight as
well. I don't want to
share the inetpub directory when I already have a User share for
that purpose.
2) All developers have the same project / solution files.

And for bonus points

3) I'd prefer it if the code files did not have to be in the virtual
root directory.

Regards,
Peter Row
Nov 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"Peter Row" <pe*******@oxfordcc.co.uk> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
Hi,

Can someone give me a set of steps for an ASP.NET project (well actually its just a
VB.NET class DLL that implements HttpHandler) that will work when moved
to another developers machine?

Here are some specifics:

1) The code, project/solution files are in MS Visual Source Safe
2) Developer X gets the files into a directory (recursively building any
folder structure)
3) Opens solution or project (doesn't matter which) --- $%&*^ - BANG

Depending on which developer does it one or more of the problems arise:

1) VS.NET 2003 copies all the files to the wwwroot !! - NO this is plain
wrong and ugly.
He should first set a working directory instead of wwwroot. After doing
that, recursive get (no checkout) will create the rest
And, I use the visual sourcesafe explorer *itselves*...
After that I edit the project files to make it 'moved'
But I think that visual studio also can do it using 'copy project' and in
that case, all stuff is moved to another IIS server.
If copied, you can easily readd all the project files to a new VSS
directory.

3) I'd prefer it if the code files did not have to be in the virtual
root directory. The code is just at the same level as the aspx.
At development this is no problem. At deploymnet, just exclude the .cs files
from the folder.
Regards,
Peter Row


Nov 18 '05 #2

P: n/a
Hi,

See in line comments.
Hi,

Can someone give me a set of steps for an ASP.NET project (well actually

its
just a
VB.NET class DLL that implements HttpHandler) that will work when moved
to another developers machine?

Here are some specifics:

1) The code, project/solution files are in MS Visual Source Safe
2) Developer X gets the files into a directory (recursively building any
folder structure)
3) Opens solution or project (doesn't matter which) --- $%&*^ - BANG

Depending on which developer does it one or more of the problems arise:

1) VS.NET 2003 copies all the files to the wwwroot !! - NO this is plain
wrong and ugly.


He should first set a working directory instead of wwwroot. After doing
that, recursive get (no checkout) will create the rest
And, I use the visual sourcesafe explorer *itselves*...
After that I edit the project files to make it 'moved'
But I think that visual studio also can do it using 'copy project' and in
that case, all stuff is moved to another IIS server.
If copied, you can easily readd all the project files to a new VSS
directory.

Ummm not sure you read my post, see (2) above. He has already got the
files from VSS into a directory of his own choice using the recursive
option.
I don't want to create any extra VSS projects or recreate any VS.NET 2003
projects or solution files. I should not have to either.

Regards,
Peter
Nov 18 '05 #3

P: n/a
"Peter Row" <pe*******@oxfordcc.co.uk> wrote in message
news:O6**************@TK2MSFTNGP11.phx.gbl...
Hi,

See in line comments.
Hi, directory.

Ummm not sure you read my post, see (2) above. He has already got the
files from VSS into a directory of his own choice using the recursive
option.
I don't want to create any extra VSS projects or recreate any VS.NET 2003
projects or solution files. I should not have to either.


Agree, it is no nice way to fix it.

No extra projects, you can minimize the work... by exporting the project
(using Visual Studio) and and add that project to a new source safe project
(using visual studio).

If you copy-paste using explorer or DOS, you'll have problems because of the
meta data that points to the old URL...

Regards,
Peter


Nov 18 '05 #4

P: n/a
Hi,

See inline comments

Agree, it is no nice way to fix it.

No extra projects, you can minimize the work... by exporting the project
(using Visual Studio) and and add that project to a new source safe project (using visual studio).

If you copy-paste using explorer or DOS, you'll have problems because of the meta data that points to the old URL...

All the other developers are creating the virtual directory with the same
name
as the virtual directory that I used when I created the project, therefore
the meta
data should not cause a problem.

There must be a way to do what I want it is so the most obvious thing that
most
developers would want to do.

If anybody from Microsoft is read this, you'd better fix this bug in the
next
VS.NET.

Regards,
Peter
Nov 18 '05 #5

P: n/a
I'm not sure I follow your request because I don't think it's possible to do
what you're asking, but I'm no expert.

The files are probably copied to wwwroot because that is where the
developers default directory is located. If I understand what you're saying
you want to be able to create the directory somewhere else and have VS 2300
associate the existing project with that directory. I don't think this is
possible because it is an existing project. I think when a project is setup
the location of the virtual directory is established. I've pulled up old
projects before and they have errored off when they couldn't find the
virtual directory.

You could try this experiment. Setup IIS on your local machine so that the
default root is something besides c:\inetpub\wwwroot. Then create a new ASP
Web project. Make sure the new project is setup using to the new default
root. Load that project into VSS and have someone else download it and pull
it up in VS 2003. It would be interesting to see if the project tries to
load in the new default root you setup.

As far as the code files not being in the virtual root, well, the aspx does
need to be there but all other files are only there when you are developing.
When you deploy those files are required anymore. I never really minded this
because it seemed easier than having the files in two location (virtual and
a working directory) and trying to decide which was correct.
"Peter Row" <pe*******@oxfordcc.co.uk> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
Hi,

Can someone give me a set of steps for an ASP.NET project (well actually its just a
VB.NET class DLL that implements HttpHandler) that will work when moved
to another developers machine?

Here are some specifics:

1) The code, project/solution files are in MS Visual Source Safe
2) Developer X gets the files into a directory (recursively building any
folder structure)
3) Opens solution or project (doesn't matter which) --- $%&*^ - BANG

Depending on which developer does it one or more of the problems arise:

1) VS.NET 2003 copies all the files to the wwwroot !! - NO this is plain
wrong and ugly.
2) A vritual directory has already been setup and pointing to the directory where the
VSS files were put (as is needed) and it asks for a URL the usual
http://localhost/[virtualrootname] is entered but it says that the
project already exists.

God damn it!
Why is it so bloody hard to create a web project where the files are located where
you want!!

I love .NET but at least in VB6 webclasses you could put the files where you liked
the only restriction being that the project file had to be in the virtual
root. Now it
is one big massive headache.

So repeating initial question:
Can anybody give me a step-by-step guide so that the following
conditions are met:
1) All code files are in a developer specified location NOT in
c:\inetpub\wwwroot.
We're using VSS but I like my files to be backed up overnight as
well. I don't want to
share the inetpub directory when I already have a User share for
that purpose.
2) All developers have the same project / solution files.

And for bonus points

3) I'd prefer it if the code files did not have to be in the virtual
root directory.

Regards,
Peter Row

Nov 18 '05 #6

P: n/a
Hi,
I'm not sure I follow your request because I don't think it's possible to do what you're asking, but I'm no expert.
It should be possible and would be if MS pulled their collective finger out.
The files are probably copied to wwwroot because that is where the
developers default directory is located. If I understand what you're saying you want to be able to create the directory somewhere else and have VS 2300 associate the existing project with that directory. I don't think this is
possible because it is an existing project. I think when a project is setup the location of the virtual directory is established. I've pulled up old
projects before and they have errored off when they couldn't find the
virtual directory.
Answer me this why should VS 2003 care where the default directory for the
IIS root is ??? Why does it need to copy the files here?

The project and solution files do not mention any paths etc... as I checked
them,
so I fail to see how differing directory structure plays a part in this. The
only thing
that is mentioned is the the URL which is typically
http://localhost/[projname]
therefore if all developers have the same named virtual root it should just
work.
You could try this experiment. Setup IIS on your local machine so that the
default root is something besides c:\inetpub\wwwroot. Then create a new ASP Web project. Make sure the new project is setup using to the new default
root. Load that project into VSS and have someone else download it and pull it up in VS 2003. It would be interesting to see if the project tries to
load in the new default root you setup.
Even if it did do this, then again my question from above why does VS 2003
care?

If you use IIS Manager, create a virtual root called GodDamnIt pointing to
directory
C:\Usr\God_Damn_Microsoft and then fetch all the relevant files/dir
structure
from VSS. If a second developer then does the same thing except they map and
fetch
the files into E:\Usr\For_Christs_Sake, why does the 2nd user get screwed
over????

The project and solution files only mention the URL which in both developers
cases
is the same!!!!
As far as the code files not being in the virtual root, well, the aspx does need to be there but all other files are only there when you are developing. When you deploy those files are required anymore. I never really minded this because it seemed easier than having the files in two location (virtual and a working directory) and trying to decide which was correct.

That is the whole point!!!!
If VS2003 didn't fuck up and copy all the files to c:\inetpub\wwwroot in the
first
place then the directory you actually put the files, i.e. C:\Usr\ProjectName
would be
fine.

A virtual directory is just that - virtual - it does not exist!
i.e. in the context http://localhost/MyTest, MyTest is a virtual directory
which
doesn't exist, in reality MyTest points to c:\usr\mytest.

The reason for not having the code files in the physical directory that the
virtual directory
points to is so that you can do a straight directory copy when deploying to
a test server.
For example I have a CSS and Image directory in the physical directory that
my virtual
root points to along with some loose files. I don't want all the code files
copied across
when I do the dir copy.

I'm sorry if this sounds a bit harsh. But what I am trying to achieve seems
to be the
most logical, obvious thing to want to do and MS is stopping me doing it.
Every
developer in the office agrees.

Regards,
Peter
Nov 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.