Reading the "Creating a VS.Net web project with Vault" FAQ, it says:
"9. You will be prompted to choose another location (for project files). Make sure to choose the exact same location as you chose in the previous step." - where the previous step was the location to place the solution file.
Is this saying to place the project files in the same Vault location as the solution file? If so, then you could not set the working folder for the solution to be C:\Documents and Settings\<user>\My Documents\Visual Studio Projects\<project> and have the working folder for the project files be C:\Inetpub\wwwroot\<project>
Am I misreading step 9 of the FAQ, or should the project files really be put in a Vault subfolder of the solution file?
Web project file structure
Moderator: SourceGear
ulfius:
i'm not an expert in this area, but i just tried a sample. someone please correct me if i made a boneheaded mistake.
1) created a dummy web app (WebApplication1)
2) added it to a repository ( $/jeff was the parent. the full path was $/jeff/WebApplication1)
3) it then asked me to choose a location for project/solution, i chose $/jeff/WebApplication1. same as in step 2.
i now have a flat architecture where $/jeff/WebApplication1 maps to c:\inetpub\wwwroot\WebApplication1. note, all files (.csproj, .sln, global.asax, webform1.*, etc) are all within this one directory.
it looks like the directions are having you place the project/solution files in the same directory as the web app.
hth
i'm not an expert in this area, but i just tried a sample. someone please correct me if i made a boneheaded mistake.
1) created a dummy web app (WebApplication1)
2) added it to a repository ( $/jeff was the parent. the full path was $/jeff/WebApplication1)
3) it then asked me to choose a location for project/solution, i chose $/jeff/WebApplication1. same as in step 2.
i now have a flat architecture where $/jeff/WebApplication1 maps to c:\inetpub\wwwroot\WebApplication1. note, all files (.csproj, .sln, global.asax, webform1.*, etc) are all within this one directory.
it looks like the directions are having you place the project/solution files in the same directory as the web app.
hth
Jeff Clausius
SourceGear
SourceGear
If I understand your question correctly,
Our KB article (http://support.sourcegear.com/viewtopic.php?t=222) reccommends a directory structure that puts the solution file and the project files in the same directory. This assumes that all of the projects are ok being in the same directory. You are wondering if this takes away the ability to set a different working directory for a subfolder.
For example, I created a Web application solution that looks like this in the solution explorer.
When I follow the instructions in the KB article, I see a structure in Vault like this:
You're right, that doesn't look much like the solution explorer. If you select the directory that got created, then the structure looks exactly like the one in the solution explorer, and you have more freedom to sprinkle the projects around your hard drive. I'll change the KB article to reflect this better practice.
To sum up, the better way to add the solution to source control is to select $/trunk in the first dialog, and select $/turnk/WebApplication1 in subsequent dialogs.
Our KB article (http://support.sourcegear.com/viewtopic.php?t=222) reccommends a directory structure that puts the solution file and the project files in the same directory. This assumes that all of the projects are ok being in the same directory. You are wondering if this takes away the ability to set a different working directory for a subfolder.
For example, I created a Web application solution that looks like this in the solution explorer.
Code: Select all
Solution WebApplication1
ClassLibrary1
References
AssemblyInfo.cs
Class1.cs
WebApplication1
References
AssemblyInfo.cs
Global.asax
Web.config
WebForm1.aspx
Code: Select all
$/directory_I_chose_both_times
WebApplication1
AssemblyInfo.cs
Global.asax
Global.asax.cs
Global.asax.resx
Web.config
WebApplication1.csproj
WebApplication1.csproj.vspscc
WebApplication1.sln
WebApplication1.sln.vspscc
WebForm1.aspx
WebForm1.aspx.cs
WebForm1.aspx.resx
ClassLibrary1 (subfolder of WebApplication1)
AssemblyInfo.cs
Class1.cs
ClassLibrary1.csproj
ClassLibrary1.csproj.vspscc
To sum up, the better way to add the solution to source control is to select $/trunk in the first dialog, and select $/turnk/WebApplication1 in subsequent dialogs.
Given the following structure:
If you needed to branch WebProject, but knew that you weren't going to have to change ClassLibrary, then you have several options.
1. Branch $/trunk/src/WebSolution to $/branches/WebSolution. This gives you the easiest time, because you can just download to a different directory and work in the new location. The tradeoff is that you have more nodes in your Vault tree.
2. Branch just $/trunk/src/WebSolution/WebProject to $/branches/WebProject. With tweaking of the working folders and IIS virtual directories, this would allow you to use the $/trunk/src objects for all but the files in WebProject.
I don't claim that this is solid advice, or even that it would work for you, since everyone's workflow is different. I can say that here at Sourcegear, we branch at the solution level, but then we've only had to do that less than 10 times in the time that we've been working on Vault. If you branch more frequently, then you will not want so many extra nodes in your tree.
Code: Select all
$/trunk/src/WebSolution
$/trunk/src/WebSolution/WebSolution.sln
$/trunk/src/WebSolution/WebProject/WebProject.csproj
$/trunk/src/WebSolution/ClassLibrary/ClassLibrary.csproj
1. Branch $/trunk/src/WebSolution to $/branches/WebSolution. This gives you the easiest time, because you can just download to a different directory and work in the new location. The tradeoff is that you have more nodes in your Vault tree.
2. Branch just $/trunk/src/WebSolution/WebProject to $/branches/WebProject. With tweaking of the working folders and IIS virtual directories, this would allow you to use the $/trunk/src objects for all but the files in WebProject.
I don't claim that this is solid advice, or even that it would work for you, since everyone's workflow is different. I can say that here at Sourcegear, we branch at the solution level, but then we've only had to do that less than 10 times in the time that we've been working on Vault. If you branch more frequently, then you will not want so many extra nodes in your tree.