Will Carter

In Visual Studio 2005, When I...
File > Source Control > Open from source control
...an extra folder is created. So, for instance, if I get a project that lives in $/cSharp/MyProject, the code ends up in C:\
cSharp\MyProject\MyProject. I have my solution file in c:\cSharp\MyProject (I think this may be contributing )

These thread seems to be discussing about the same issue, but I am not using Team Foundation:
http://forums.microsoft.com/msdn/ShowPost.aspx postid=1867948&siteid=1

I am Visual Studio 2005 and Visual Source Safe 6.0

Any help to work around this a solution would be appreciated.

thanks...


Re: Visual Studio Source Control and SourceSafe VS 2005 and VSS 6.0, Open from source control creates an extra folder?

Barry Tu MSFT

Hi Will,

The extra folder created might be "by design" or a bug. I will need some more information before I can answer your question.

What is the VSS path for your solution file

Is it located in the same place as your project in $/cSharp/MyProject or $/cSharp

How many projects do you have in your solution

Did you initially added the solution and project to source control using VS 2005 or some previous version of VS

Was your solution and projects in the same folder on disk before adding to source control or was your project under a subfolder of where the solution file lives on disk

When doing a Open From SCC operation, did you choose to get the solution or project file

When doing a Open From SCC operation, what did you specify as your "Destination Folder" before clicking the Open button Or did you right click the solution/project file and choose "Change Destination Folder" to change the destination folder

Thanks,

Barry





Re: Visual Studio Source Control and SourceSafe VS 2005 and VSS 6.0, Open from source control creates an extra folder?

Will Carter

What is the VSS path for your solution file
$/cSharp/MyProject/MyProject.sln
Is it located in the same place as your project in $/cSharp/MyProject or $/cSharp
In the same place as the project. It is in $/cSharp/MyProject/MyProject.sln
How many projects do you have in your solution
1
Did you initially added the solution and project to source control using VS 2005 or some previous version of VS
I initally added it to vss thru vs 2005. Here is how I did it. In vs, I highlighted the solution in the solution explorer. Went to file > Save MyProject.sln as > c:\cSharp\MyProject\MyProject.sln. Then I closed the solution. Then I reopened solution in vs by opening > file > c:\cSharp\MyProject\MyProject.sln. Then in vs, I went to File > Source Control > Add Solution to source control > selected $/cSharp and it made a folder in vss $/cSharp/MyProject and project was added.
Was your solution and projects in the same folder on disk before adding to source control or was your project under a subfolder of where the solution file lives on disk
same folder. everything is in c:\cSharp\MyProject
When doing a Open From SCC operation, did you choose to get the solution or project file
Hm...I think I am deviating here. This is how I open from vss:
I have all solutions closed.
File > Source Control > Open from source control
Then I get vss window with tree of folders
I select $/cSharp/MyProject
The local folder it tries to make is c:\cSharp\MyProject\MyProject\
I can edit the folder to be c:\cSharp\MyProject\
but still, I get a local version of the project
c:\cSharp\MyProject\(has solution files)
c:\cSharp\MyProject\MyProject\(has actual code files)
When doing a Open From SCC operation, what did you specify as your "Destination Folder" before clicking the Open button Or did you right click the solution/project file and choose "Change Destination Folder" to change the destination folder
Not sure what you mean, I have specified c:\cSharp\MyProject\




Re: Visual Studio Source Control and SourceSafe VS 2005 and VSS 6.0, Open from source control creates an extra folder?

Alin Constantin - MSFT

Hi Will,

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)

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...)

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.

- If I'm correct, VS will get the project files in C:\cSharp\MyProject and will create a new solution file (uncontrolled)

- Save the solution file in C:\cSharp\MyProject

- Use File/SourceControl/ChangeSourceControl dialog, select the solution line and click Bind. VS should reuse the project bindings

- Click Ok in ChangeScc. You may go through a couple of prompts, a checkout of the solution file, etc. In the end, checkin your changes to the solution file.

Alin





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




Re: Visual Studio Source Control and SourceSafe VS 2005 and VSS 6.0, Open from source control creates an extra folder?

Alin Constantin - MSFT

If you don't plan to upgrade to VSS 6.0d (although it works fine in enviroment of VSS 6.0c/VSS 6.0d clients), I'd suggest you upgrade to at least VSS 6.0c, if you don't have it already. The original VSS 6.0 shipped in 1998 has problems even with VSS2002, and provides less ideal scc integration... (e.g. has no idea that csproj files are projects)

From the source control point of view, you can use ChangeSourceControl dialog for finer control of where are your projects bound to the database.

For the ASP issues I have no idea - you can probably find an answer by posting in one of the web groups at http://forums.asp.net/

Alin