Don't have CheckOut option in Visual Studio 2012 - visual-studio

I am starting my own project with my team. I created an account in team foundation server and I could connect to the server.
Everything looks ok(I created a project and checked in it and I can see it in my tfs page) but when I try to checkout some files I don't have the CheckOut option. I can choose between Unchanged and Check In.
I checked the Server option in Source Control Settings

Here's Microsoft's Official Documentation:
Check out and edit files
TL;DR: You don't have to manually check out, just start editing and Visual Studio will automatically check it out for you.

Related

Not Working: Add a Project to Team Foundation Server 2012 using Visual Studio 2015

I am trying to add new projects to the Team Foundation Server and every way I have tried to add them has failed. We are running TFS 2012 Version: 11.0.50727.1 (RTM) and I am running Visual Studio 2015. I am a member of the Administrators Group.
I have tried at least 3 ways that MS support says how to do it on the website and none of them have worked:
I have tried to add it through Visual Studio
I have tried to add it through the Team Foundation Server Administration Console on the Server.
I have tried to add it through the TFS Web Management Portal.
When I try to add it through Visual Studio, I get an error when trying to check it in. It shows on the Source Control Explorer with a pending change of 'Add'. Here is a screenshot of the team explorer and output:
Since the message tells me to add it to the server, I opened the TFS Server Admin Console and When I go into the Team Projects Tab under Team Project Collections, it lists the existing projects, however, there is no way to add a new project. Here is a screenshot of the Admin Console:
There is only a help icon with a link on How to add a Team Project, although like with most MS help articles, it is useless. It provides information about how to do it on the web. So I tried it. I accessed the web portal for our TFS server and there isn't any option to add a project there either. When I go in to the "View the collection administration page" It tells me "Not all Collection level administration is exposed in the web experience. For all administration operations at the collection level please use the Administration Console on your Team Foundation Server.". Here is a screenshot of the online portal:
Can someone please help me with this issue? How can I add the projects to the Team Foundation Server?
I figured out how to Add the projects to the Team Foundation Server using Visual Studio 2015. It is very simple and can be done right from the File Menu in Visual Studio.
First open Visual Studio 2015. (I am not sure if it works the same in other versions.)
Go to File -> New -> Team Project...
The New Team Project Wizard will popup where you can then enter the project name and project description.
Then you can choose the template type and whether you will be using TFS Version Control or Git Distributed Version Control.
Once you click Finish, the Project will be added to TFS.
You can then add the files to the workspace folder on your dev machine.
Then you can check the files into TFS using the Team Explorer. *Note: First, you may need to add the files to the project by going to the Solution Control Explorer and right clicking on the newly created project and selecting Add Items to Folder. From there you can add the files then check them in using the Team Explorer.
Please clarify you want to create a code project/solution and add it to a TeamProject, or you want to create a TeamProject. TeamProject and code project/solution are different.
If you want to create a new TeamProject, according to Client compatibility, TFS 2012 supports VS 2015 RTM or latest update. Check your VS 2015 edition and re-try to create a TeamProject.
If you want to add a code project/solution to a TeamProject, you'll have to connect a TeamProject first and create a workspace, then perform a check-in: https://www.visualstudio.com/en-us/docs/tfvc/set-up-team-foundation-version-control-your-dev-machine
Last, try to clean the Cache folder on your dev computer. The folder path is: C:\Users\username\AppData\Local\Microsoft\Team Foundation\4.0\Cache.
If none of above works, try on another dev machine to see whether you can reproduce this issue.

Deploying to FTP/Web Deploy In Visual Studio 2015

I cannot figure out a way to publish a web project in Visual Studio 2015 CTP using web deploy or FTP. In the Publish wizard, there are only options for Azure, Import and File System. In Visual Studio 2013, there is a Custom option where you can specify the connection settings and choose between Web Deploy, Web Deploy Package, FTP and Filesystem.
I tried moving over the publish profile from my Visual Studio 2013 project by putting it in the Properties-->PublishProfiles folder, and then it behaved like Visual Studio 2013, but would not publish (failed to connect to remote host) with the same settings that publish fine in 2013.
Any ideas?
It sounds like Web Deploy 3.6 beta supports the new content models in ASP.NET 5 (ASP.NET vNext) and I guess that the VS 2015 Web-Deploy client doesn't support it yet. (28 April 2015)
This blog post gives some command-line options for using a publish profile. I'm in a new environment that isn't set up for web-deploy yet, so I haven't tried it myself. (I did a file-system publish to test against my local IIS.)
I also experienced the same issue. It seems that, at the time of writing, the FTP publish target isn’t available yet: I guess that’s most likely because the Web Development Tools are still in release candidate / preview phase, so the GUI still has some missing features.
Luckily enough the issue can be easily solved with the following workaround.
If you don't see the FTP option, choose File System instead and go ahead. When prompted for a Target Location, insert the FTP Server URL and go ahead.
The remaining steps won’t change, so you can complete the wizard that will be saved into a ProfileName.pubxml file.
Once done, open that file and apply the following changes:
Locate the <WebPublishMethod> element and change its value from FileSystem to FTP.
Locate the <UsePowerShell> element and entirely remove it.
Right after doing that, right-click to the project’s root node, select Publish and re-open your Publish Profile via the Publish Profile Wizard in edit mode: all the FTP options (Server, Site Path, Passive Mode, Username, Password) will now be available.

Disable TFS support for a Visual Studio 2010 project/solution

I inherited a project at my new company that used to connect to a TFS server. Now I only have the zip of the source/solution which I have dumped into my Kiln (mercurial) repo.
The issue I am having is every time I open the solution I see this prompt
"Please provide credentials to connect to team foundation server"
If I hit cancel I see this...
Any ideas as to how to avoid this every time I open the solution?
You need to remove the binding to TFS from the inside your projects.
In Visual studio, with the projects loaded, open the file menu->source control->change source control->Unbind for all the projects.
This will remove a section of xml from your .csproj (or whatever type).
Save your projects and you should be free of TFS.

All project Files get read only attribute after download from TFS 2010

I am using Team Foundation Server with VS 2010. I am facing a problem that when i am mapping a new folder to download the code from TFS, after download all the code, all files/folder in new folder get automatically read only attribute and i have to remove this attribute explicitly after it i am able to build the solution other wise it is giving me "Access denied" error. Is there any TFS setting which is making my project files as read only.
Not with TFS 2010, this is called "Local Workspaces" and is available from TFS 2012 onwards and works like Subversion.
What you are doing, by removing the Read Only flag, is fighting TFS. What you should do is perform a Checkout on the file before editing. If you are using Visual Studio to edit solutions/projects this will happen automatically providing you have your Solution and Project bindings setup. If you are editing files outside of Visual Studio, you can perform a checkout by:
Using Source Control Explorer in Visual Studio.
Using the Team Foundation Server Power Toys to install a Shell Extension into Windows so you can Right click.
Opening the file in Visual Studio and using it as a text editor.
Using the tf checkout command line.
By removing the read only flag, you are allowing yourself to edit the file, but not instructing TFS that you have changed it, so TFS won't know to check it in when the time comes. TFS doesn't scan you workspace for changes like Subversion.

How to detect a file modifications with TFS?

It seems that when I use a tool (such as winmerge) to update my codebase... my Visual Studio Team System (VSTS) integration with Team Foundation Server (TFS) doesn't seem to pick it up.
How do I know which files to check out and check back in? Is there something I am missing? Is this a feature that isn't part of VSTS & TFS?
First, this is probably because the files have not yet been checked out. If you do that first before running your update, TFS will see those changes.
Second, you can use TFS Power Tools (available from MS) to review local repository for changes that are not recognized. If there are found differences, power toys resets the status of the file so Pending Changes window sees the change. this does not require you to check-out the files, it will do that for you if there are differences.
Pretty nifty.
Power Tools for 2008 is here: http://www.microsoft.com/en-us/download/details.aspx?id=15836
and you are looking for the "Online" command:
"Online Command - Use the online command to create pending edits on writable files that do not have pending edits."
I assume you are applying changes across an entire project, outside of VS.
You will have to check-out the complete project first, then apply the changes and check back in. Unmodified files will not be actually checked-in, AFAIK.
Your question sound like as if you have not installed the Team Foundation Server Client.
If you have installed the Visual Studio Team System edition you are able to connect with the Team Foundation Server. But to have the integration working you need to install the Team Foundation Server Client as well.
After having done this your Visual Studio should inform you in case of file changes and then automatically check out the files.

Resources