VS2005 and web projects

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

baysidetech
Posts: 9
Joined: Mon Feb 06, 2006 3:57 pm

VS2005 and web projects

Post by baysidetech » Mon Feb 06, 2006 4:08 pm

Hello All,

I am new here so be gentle. I am using VS2005 and Vault 3.1.7 (build 3719)

I created and web project and added it to source control with no issues. However, when I try to open a project from source contril another pc running vs2005 w/Vault client I get the following error.

"There are no solution or project files in this location. Please select a different location."

Now I think this has to do with how the project is being created and then stored in the repository...but what doesn't make sense is that I can double-click on the solution file and it makes me login to the vault and I can then get the latest versions....so it works that way but not the other. I am very confused.

I don't want to have to abandon the web project format MS is using (I read Scottgus article).

Thanks in advance
Bob

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Feb 06, 2006 4:32 pm

Can you be more specific on the steps you are taking, and when you are seeing the error?

In general, the first time you use a solution on a machine, you should do a Source Control->Open From Source Control from within VS, then go to the solution location in Vault. After that, you shouldn't use Open From Source Control, but just the regular open solution.

If there is no solution or project file in the folder you are trying to open, then you would get that message.

baysidetech
Posts: 9
Joined: Mon Feb 06, 2006 3:57 pm

Post by baysidetech » Mon Feb 06, 2006 4:43 pm

Dan....here's what I did:

1) Created and new web project in VS2005 (with one default.aspx and nothing else)
2) Added a VB class to the project, which it prompted and asked if OK to store in the App_code folder....I said "sure". A new app_code folder appeared under my project with the new class
3) I right clicked the project and said add to source control.
4) Everything when up OK.


Next:
1) I when to another machine running vs2005 (although you could use the same PC) and openned vs2005.
2) I tried to open from source control and the I saw a top level project folder, with 2 subfolders: one where my solution file is and the other contains (I think) the app_code folder with the classes. Why it does this separation, I do not know.
3) If I click on the sub folder that contains my sol file, It creates the project OK, but doesn't load the app_code direc and class.
4) If I clcik the folder that just contains the app_code folder, I get the error I mentioned (I guess cause no solution or project file exists)

Should I not store anything in the app_code folder?

Hope this helps clarigy

Bob

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Feb 06, 2006 5:15 pm

OK, I see. Yes, the problem is that now that web apps no longer have project files (in VS 2005), there is no way to open them via source control, because it requires a solution or project file to open from SCC.

I am honestly not sure how MS recommends handling this in the new 2005 format. Perhaps a solution wrapper around the web project? I'll need to dig around to find the "right" answer, but in the meantime if anyone else out there knows more about this, please chime in.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Tue Feb 07, 2006 1:47 pm

I searched MS's site for more info on how to handle a single web project with source control, and couldn't find anything definitive. There is a doc that explains why they've changed it so much here: http://msdn.microsoft.com/library/defau ... rojSys.asp

The only way I've found to get around this is to put the web project under a solution, and then add the solution to source control. Then opening the solution from another machine will also open the web project, and you should be good to go.

baysidetech
Posts: 9
Joined: Mon Feb 06, 2006 3:57 pm

Post by baysidetech » Tue Feb 07, 2006 2:34 pm

Dan,

How do I add a web site projec to a solution?

and

Do I then right click the solution name and select add to source control?

-Bob

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Tue Feb 07, 2006 2:50 pm

VS2005 seems not to like to expose the solution file as much as VS2003. You might need to create a new non-website project with a solution in a different folder, then add the web site project to it. That, or add a new project (like a class lib) to the existing web site project, which will create the solution file. However, I noticed that in this case, the solution file is created in Docs & Settings, not near where the other projects are created, and this causes problems when adding to source control, because it wants to add it from a common root to all projects.


Once you have a solution file, right clicking and adding to source control should work fine.

baysidetech
Posts: 9
Joined: Mon Feb 06, 2006 3:57 pm

Post by baysidetech » Tue Feb 07, 2006 7:06 pm

Can you check your private message box.....

-Bob


I tried what you suggested but no go.

baysidetech
Posts: 9
Joined: Mon Feb 06, 2006 3:57 pm

Post by baysidetech » Wed Feb 08, 2006 9:15 am

Dan...the app_code directotry seems toi be giving Source Control fits.

I tried again and it says that some directories can not be created...etc.

I sent you a private message.

Tonya
Posts: 919
Joined: Thu Jan 20, 2005 1:47 pm
Location: SourceGear

Post by Tonya » Wed Feb 08, 2006 3:47 pm

Bob,

Per our earlier conversation, I wanted to forward you a Microsoft link that describes how to open a web project from source control:

http://msdn2.microsoft.com/en-us/library/b9zzhatx.aspx

We have tested this scenario and have successfully opened web projects using the above steps.

Please let me know if you still have the problem.

Thanks,

Tonya Nunn
SourceGear
217-356-0105 ext. 680

baysidetech
Posts: 9
Joined: Mon Feb 06, 2006 3:57 pm

Post by baysidetech » Wed Feb 08, 2006 7:48 pm

Tonya/Dan....

Thanks so much for all the effort. The article you pointed me to worked!

You guys are the best!


-Bob

baysidetech
Posts: 9
Joined: Mon Feb 06, 2006 3:57 pm

Post by baysidetech » Thu Feb 09, 2006 5:16 pm

Dan/Tonya...

If I add another project to a solution containing a single web project my other developers don't see if they refresh their solutions. I have already added the new project to source control via the file menu. And if I ask them to do a get latest version on the solution, they don't see it.

Do they need to add the project to the solution manually, using add project to solution from the file menu? Or is there a way to do it more "automatic"

Thanks
-Bob

Tonya
Posts: 919
Joined: Thu Jan 20, 2005 1:47 pm
Location: SourceGear

Post by Tonya » Fri Feb 10, 2006 9:52 am

Hi Bob,

I have confirmed the issue that you are reporting. I wanted to let you know that I am currently checking into a resolution and will be getting back to you shortly.

Thanks for reporting this.

Tonya

Tonya
Posts: 919
Joined: Thu Jan 20, 2005 1:47 pm
Location: SourceGear

Post by Tonya » Fri Feb 10, 2006 2:36 pm

I have spent a lot of time trying to find a resolution without much of one. This problem is also reproduceable in Visual SourceSafe, so it appears to be a problem within Visual Studio 2005. Researching into how web projects now function within 2005 is much different then VS.Net 2003. Web projects have no actual project files as Dan noted above and appears to be causing issues.

My suggestion is to contact Microsoft in regards to this issue. Please keep me posted and let me know how they respond.

Thanks,

Tonya

baysidetech
Posts: 9
Joined: Mon Feb 06, 2006 3:57 pm

Post by baysidetech » Fri Feb 10, 2006 3:42 pm

Tonya....I figured out a work around.

1) NEVER create a web project first.
2) Always create some other form of project like a class lib and make sure you indicate that you want a solution create.
3) Once you have created the class lib project within a solution, you can add a web project to the solution. It works great after that. You can add new projects of any type to the solution and the rest of the team will see them with a get all recursive and a refresh.

Oh, did I mention, NEVER create a web project first!

Thanks again,
Bob

Post Reply