How to add new page in VS 2010 with tfs - visual-studio-2010

I am completely new to TFS 2010 and am trying to use it for basic source control. I have successfully added an exsting project, however I cannot figure out how to add a basic new .aspx file. I know I am missing something completely obvious here.
Is there another product I should consider altogether? My needs are very basic and TFS seems to be complicated for what I am doing.
Thanks!

To answer your second question: if you think TFS is too complicated, then google an alternative and try it. Version control is not simple, though, and you won't necessarily make it any easier by changing products.
For your first question: add the aspx file to your project exactly as you normally would. If you do this in Visual Studio then the file will be added to your "Pending Changes" list in TFS automatically, and all you need to do is check in.

Right click on .soln in Source Control Explorer-->"Get Latest"
Open the .soln
In solution explorer, right click on your project or a folder -->"Add"
Right click on the new file once you've created it and "Check in"

Related

.csproj file is missing while checkin the pending changes in TFS

I am working in Visual Studio 2010 with Team Foundation Server 2010. Everything was fine with the check in and check out. Now I am stuck with a problem. The problem is .csproj file is missing while showing the pending changes. Because of this when I check in any .cs file it is not updated in server. Can anyone say me in what way I am going wrong?
The first thing you should do is install TFS power tools. My suspicion from what you've said is that the csproj file is not under source control, and the easiest way to get it in is via power tools.
In order to validate that this is the case, open the source control explorer and look in your repository for the csproj file. My guess is that you won't find it. If you don't then navigate to it in explorer, right click and select add to source control.
(You can do this without power tools, just select add files and navigate to it)
I had the same problem and then found the .csproj under "Excluded changes" via the "Detected xx add(s)" link. I could "promote" it so it got visible in the "Included changes".

Some projects not showing TFS Menus

I have 8 projects in my solution. 3 of them are not showing any TFS menus when I right click on the project or any of the files from Solution Explorer. They are in TFS though, if I go through the Source Control Explorer I can manually check them out/in. Also those 3 projects do not have associated .vspscc which the other 5 projects do. Something must have got messed up but I am not sure what. How can I fix this so that I get those TFS options back in Solution Explorer. Having to manually check out/in is not practical.
edit: I've tried wiping my local copy and bringing the solution down from source control again. I've also removed those projects from the solution and re-added them which did not work.
It sounds like 3 of your projects have lost their source control bindings. You should be able to restore them easily. Just go to the Change Source Control dialog, which will allow you to set the source control bindings for all the projects in your solution:
File > Source Control > Change Source Control...
Then you'll need to enter your TFS server name and the server path for the projects that have lost their bindings.
Edward got me pointed in the right direction, for me it was an issue of TFS having gone offline.
Resolution: I selected the Solution level in Solution explorer, then went into File>Source Control> and selected the Go Online menu option, which restored all of my right click TFS menu options.

How to add TFS bindings to a Visual Studio 2010 project?

There's a question already discussing how to add project/solution bindings to TFS, however it seems to only apply to Visual Studio 2008 (I am unable to find the "Change Source Control" dialog in VS2010).
I have a solution and source code on my local machine already in TFS, however it does not have TFS bindings (the thing that produces the padlock icon in the Visual Studio Solution Explorer and allows automatic checkout).
How can I add bindings to an existing TFS project using Visual Studio 2010?
In VS2010 check Tools>Options>Source Control and see if set to TFS. If not that might be why you don't see File->Source Control->Change Source Control.
I ran into this problem and, for me, the issue was that my solution was offline with respect to TFS. Upon trying to change source control, I received a message stating that it is already associated with source control but is offline. I placed the solution on-line, per my recollection, using the File->Source Control->Go Online menu option and this seemed to fix the problem.
Go to the source control explorer under Team Explorer, where you can see your repository. Right click on the top folder that maps to the folder on your local machine. There's an option called "Map to local folder". Map this to the folder on your local machine. This will set up all the bindings for TFS for your project.
I had the same problem and the following steps solved it for me in VS 2008.
Unfortunately, I didn't record the exact steps and don't want to add a new project to our TFS to try again, so the steps are from memory.
Go to File Menu -> Source Control -> Open from source control
Select solution file from TFS hierarchy
Accept any warning about project already being on local disc
A popup dialog comes up saying something along the lines "This solution is already under source control, but no bindings exist. Do you want to add them?"
A selector shows all projects in a grid and allows adding the required bindings. Add TFS server setting to each project (select all lines in grid at once and press a button at the top. I can't remember what it was called, but it was fairly obvious).

disconnect visual studio solution from sourcesafe?

I'm working on a project for a firm that has their main solution in sourcesafe. The other developers are working like beavers on new stuff, and I'd like to be able to download the source from VSS, then disconnect it. So I can get up to speed on the code without risk of bothering anyone else's code.
Is it possible to do this? Many thanks if so.
-Larry
It's been a while since the scary days of source safe, but i believe this is what you have to do. In Visual Studio, go to File -> Source Safe -> Change Source Control (?). It'll open up a new window and list projects under current solution bound to Source Safe. Select the project you want to remove and click 'Unbind' at the top. It'll remove source safe bindings from the project. If you have to bind again, just click 'Bind' and select the location in the repository to bind to.
From How to Remove Version Control Bindings from Visual Studio Solutions at devx.com:
Close all instances of Visual Studio, and delete all the files in the solution directory that end with .scc.
Edit the solution to remove all traces of the source code controller binding. Remove the section GlobalSection(SourceCodeControl) in the solution file. Also remove the keys named SccProjectName, SccLocalPath, SccAuxPath, and SccProvider.
Why don't you just make a branch?
To unbind the solution/Project from VSS:
In Visual Studio, open Solution Explorer and select a solution or project to unbind.
On the File menu, click Source Control, then Change Source Control.
In the Change Source Control dialog box, click Unbind.
Click OK.

Can you add documents and spreadsheets to a Visual Studio Project?

In Eclipse, I often include all project-related material (including documents in PDF, Microsoft, and OpenDocument formats) in the project. Is this possible with Visual Studio, especially to the point where if I attempt to open the file from inside Visual Studio, it will open in the external application?
Yes, just right-click your project in the solution explorer and goto Add > Existing Item...
Though -- I'd recommend making a new folder to keep this in.
Yes, you can make sure that when you open it it opens with the correct application. Just right-click the file once it's added into the solution explorer and select Open With... and make sure you set the default application that way from that point forward you can just double-click your files.
If you have access to use Sharepoint Services with your source control than that would also make life much easier, thanks for reminding me Chris!
I don't want to take away from Chad's answer. However, I will add that TFS has specific areas for project documentation to be stored in sharepoint.

Resources