Missing: Add solution to source control - visual-studio-2012

I have successfully installed and connected to my Team Foundation 2012 server. But I am unable to add my solution to it, Im missing it when I right click on the solution, see image below.
If I try to create a new solution, I can add it to my source control.
Long time ago, I had the code on a Team Foundation server 2010, but when the trial ended I had to stop using that source control. Not sure if that has something to do with this tho.

This happen when the project had already a previous binding. Just do:
File->Source Control->Advanced->Change Source Control
You should see your project with Invalid Binding.
Do Unbind of the project, now you'll see again the "Add Project To Source Control"

File -> Source Control -> Advanced -> Workspaces...
There I had to Edit my workspace and define a local local folder and a soruce control folder.
Right click on solution and click on Go online, then I was able to Add solution to Source control.

I had the same problem.
After creating a project in TFS server and connecting to it by using Team Explorer in visual studio, I followed below steps:
I closed VS and opened the .sln file in notepad and deleted below section.
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
I opened .sln file in VS, selected 'Visual Studio Team Foundation Server' in Tools --> Options --> Source Control page.when I right clicked on solution file 'Add to Source Control' was there.

I got the same problem.
I found I got two projects in my solution, one was under source control, the other one was not. What worked for me was to undo the project which was already under source control. After I undo all changes, I finally found the "source control" option when I right clicked the solution.

My File menu -> Add to source control option was missing in VS 2013. After opening the Team explorer tab (beside thesolution explorer tab), It appeared again.
Also make sure you have selected the correct plugin: Tools -> Options -> Source control -> plugin-selection -> select Git

if your Datatable header responsive issue then use it
$('a[data-toggle="tab"]').on('shown.bs.tab', function(e){
$($.fn.dataTable.tables(true)).DataTable()
.columns.adjust()
.responsive.recalc();
});

Related

How do I download the content of a project in Visual Studio TFS?

How do I download the content of a project in Visual Studio TFS? I clicked around and I did not find an easy or intuitive way to do it. It is an old project that I thought had been lost until I reinstalled the latest version of Visual Studio.
You can get the TFS project from Visual Studio. First, you have to connect the project via Team Explorer in Visual Studio then add a server and click 'select team project' and you're done. It is downloaded to your PC.
You can find a documentation here.
EDIT:
Also, if you want to download your code as a zip:
You can click on any ellipsis to find the menu which contains Download as Zip option.
If you merely want an archive of the contents of a folder, you can right-click on the folder in the tree view on the left hand side of the page (in this case, on $/gelsana) and select the option "Download as Zip".
This is suitable for archival purposes. You cannot check-in changes made using this option.

Visual Studio 2012 - Adding files via Solution Explorer not showing in Pending Changes

I have a VS 2012 solution with multiple projects in it.
When I create a new solution folder or new a folder under projects and add files via the "Solution Explorer" it just modifies the sln or csproj file. The newly added files do not show up in "Pending Changes".
I am having to add the files explicitly again via "Source Control Explorer" -> "Add Items to Folder" to have it actually [add] before check-in.
What would I need to change to have the files added via "Solution Explorer" itself?
Try creating a brand new solution, and then add it to source control. Does the issue still happen for new projects in that solution? Is it the same behaviour for your colleagues?
If so then it sounds to me like you have some strange checkin policy screwing it up.
See the answers in this question for ideas.
Failing all of those, maybe a reinstall of TFS on the server is required, or if it's only affecting you, reinstall VS.

TFS 2012 Source Control Explorer only shows my check outs

When I open the Source Control Explorer in VS2012 I can only see what files I have checked out. If my co-worker checks out a file I cannot see a red check mark, it does not say "edit" under the Pending Changes column, there is no name listed under the User column. There is no indication that the file is checked out at all.
Same thing in reverse. He cannot see which files I have checked out. So far we experimented with only 2 Team Projects. One was a Web Site project the other a Web Services (asmx) project.
I found this Visual Studio 2012 not integrating properly with TFS explorer
When I go to File|Source Control|Advanced I do not see a "Change Source Control" option.
Suggestions?
How embarrassing...we just figured it out.
The Team Project allows multiple check-outs, so it makes sense that we were both able to check out the file(s), the issue was that we couldn't see which files the other had checked out.
Part of my issue was I had "Team Project 1" open in my Team Explorer, but a solution from "Team Project 2" open in Visual Studio. So I think that's why I couldn't see the "Change Source Control" option. As soon as I changed the Team Project in Team Explorer I was able to see the "Change Source Control" option (File|Source Control|Advanced|Change Source Control).
Once I opened the "Change Source Control" screen I saw that my solution and project were unbound. I bound them. Then I went to my co-worker's machine, his were also unbound. I bound them. We are able to see each other's check-outs in Source Control Explorer now.

Importing an existing source file in Visual Studio 2012

I want to add the source-code of a tutorial into an existing project, and I want the file to be copied to the project folder from the temporary file on the desktop I downloaded it to. Context clicking on the "Source Files" Folder in the Solution Explorer leads me the Add->Existing Item... menu, and I can then add the source file. However, it is NOT copied into the project folder, but stays in its original location. The project just knows about it, displays it in the Solution Explorer, and considers it part of the project.
This help page on MSDN tells me that in Visual Studio 2010, default behaviour used to consist in copying the file into the project folder, and that one could choose to Add a link instead of physically importing the file into the project directory by choosing "Add Link". However, now I always only get a link, and real physical import into the project folder seems impossible.
I could go through the File Explorer to physically import, but the Solution Explorer doesn't update the new files on the fly, and I would like to do this from within VS.
Is there a way? Is this a bug in VS 2012?
Copy in the files using Explorer, then in the solution explorer tick the Show All files option in the button bar of the solution explorer (you might need to select a Project first).
You can now right-click any files not part of the projects and choose Include in Project.
Or use the Add Existing File option.
The reason files are not added automatically to your solution when pasted into the folder using Explorer is because you might not want to have them added.
A neat little trick is to use the "Open In explorer" option:
(though it might be added by the Productivity Power Tools).
Plus, you can Drag&Drop files directly from explorer to the Visual Studio (when they're both running in the same elevation level if you have User Account Control enabled). To fix the UAC issues, you can either run Explorer as administrator too or install the VSCommands extension.
And you can Copy&Paste a file or set of files into the solution explorer by right-clicking a project or project folder and picking Paste on the context menu.

How do I add folders into the Solution Explorer for Visual Studio Express 2012 for Web?

I am very new to Visual studio, so I am trying to learn the basics.
I have read so many articles but some are for 2012, some are for the non-web version, etc, but I seriously can't find a solution to such a simple task as this.
I am using Visual Studio Express 2012 for Web, and have created a "Blank Solution".
I end up with this view:
Now my goal is to add all my existing files and folders and have it shown in Visual Studio.
So, I have located my solution file on disk and copied all my files into the same folder:
Now, I know its possible to add single items into the view by right clicking and picking add item:
But I cant include folders here. I have tried to drag and drop, I have read guides about using the "Show all files" button, but apparently that does not exist for the Web version of Visual Studio 2012.
Could anyone please tell me what the proper way is to include all my files into the solution explorer?
I just had this same problem in Visual Studio 2012 Ultimate. I know your question is about Web but maybe this will work for you too.
Assuming the files/folders you want to include are in your solution folder, from the Project menu toggle on "Show All Files", then you should see the files/folders in Solution Explorer. Select those you want to include, right click and choose "Include in Project".
A solution contains one or several projects and no solution-wide files (normally). Create a project, and then follow How do I add an existing directory tree to a project in Visual Studio? to add the files.
(It was a long time ago I did it this way, and with an earlier version of Visual Studio, so YMMV.)
I think that the best way to do it is to simply drag&drop desired folders with files between file explorer and solution explorer in VS. I've just tested it and that works the best for me.
You can place your files in the Solution folder and refresh the solution explorer :) It'll automatically add your files, I do it for 2010 and think it'll work for 2012 as well
In solution Explorer top toggle,You can find few icons, Find Show all files and click on it.Navigate to the folder exactly matching the same address in your visual studio and you can see a folder which is newly added into your project,Which is displayed as a dotted folder and right click on it and include it into project.
Don't forget to convert the project into Web-Application.
Thanks.
I actually found the solution.
So in solution explorer there is a button "Solutions and Folders" screenshot
When you pressed it your project folder would be opened. You find the folder that you need to add, copy it (screenshot), return to project solution and past it

Resources