Re: Visual Studio Source Control and SourceSafe VS 2005 and VSS 6.0, Open from source control creates an extra folder?
Will Carter
Hi Alin,
My comments are in blue.
Since you're not mentioning anything about a .root folder, I suspect you are using a VSS 6.0c or older build of VSS6. I'd advise you to upgrade for free to the latest shipped VSS 6.0d build by installing VS6 SP6 (http://msdn2.microsoft.com/en-us/vstudio/aa718364.aspx)
I agree with you, but there are others here with the same version of vss that I am using and I don't want to introduce another problem by upgrading to a different version at this point until I get this hammered out.
How the projects are opened from source control depends on how the project bindings are written in the sln and csproj files (you can view the Local and Server bindings using the File/SourceControl/ChangeSourceControl dialog) and these bindings were established by VS when the project was added to scc depending on what files were in project at that time.
Anyway, if I understand correctly, you have now in the VSS database both the csproj project and the sln file in the $/cSharp/MyProject. (Is this true If not, please let me know what your current bindings are...)
No, actually I have no csproj file, only a solution file. This web site was created in vs 2005 by going to File > New Website. When a new website is created, a sln file is created here:
C:\Documents and Settings\wcarter\My Documents\Visual Studio Projects\MyProject\MyProject.sln
Then I highlight my solution in visual studio and file > save solution as:
c:\cSharp\MyProject\MyProject.sln
Then In visual studio, I "Add solution to source control" and only have a sln file in source control.
You want to open from source control and have both the files in C:\cSharp\MyProject.
Here is what I'd try:
- in VS, File/SourceControl/OpenFromSourceControl. Pick the $/cSharp/MyProject and C:\cSharp\MyProject. for the destination.
- If both sln and csproj files are in in $:/cSharp/MyProject, you should see now a FileOpen dialog that allows you to pick between the solution and the project file. I would pick the project file here.
I figured this was my problem. The fact that I don't have a csproj and a sln. So I tried the following: Instead of creating a new website in visual studio, I do the following: file > new > project and pick "ASP.net web application". When I do this, I get a sln and a csproj file where I would expect:
c:\cSharp\MyNewProject\MyNewProject.sln
c:\cSharp\MyNewProject\MyNewProject.csproj
I can add this solution to source control and can check it out (by selecting the project not the sln) and it doesn't make the extra folder.
I thought I had it resolved, but then I see that this new project that was created with file > new > project > "ASP.net web application" seems to be in asp.net 1.1 template. For instance, when I try to add an App_Code folder it isn't an option. When I create a new web form, it wires up the codebehind with the "CodeBehind" attribute in the Page Directive instead of "CodeFile"
I am a bit frustrated and a bit new to vs 2005 (I had only been using visual web developer in the past). Any help you can provide would be appreciated.
thanks,
will