Visual Studio Team Services (TFS online) - Get latest over two PCs with same account (VS2015) - visual-studio

My issue is that Get Latest (TFS) does not work using the same account over two PC's for a newly created file. Steps to reproduce:
On my main PC I opened Visual Studio 2015 (CE).
I created a new typescript (.ts) file.
I checked this new ts file in.
I go to work on my laptop and open VS2015 (using my same Microsoft Live account) and the new files do not download when I go to Get Latest.
If I traverse the files to see what was checked in on the server, they have been checked in successfully.
Exploring the files via VS2015 through the team explorer I see the files, they are indicated as not having downloaded and also is indicate "latest" as "no".
It would seem that my laptop is telling VS online that no changes to this file have been made (well in fact I cannot download the file to my laptop and is not present on my laptop so technically true - its hasn't changed because I can't download it to change it).
How do I tell VS online that my laptop is not my main pc while still using the same account to login? Or am I missing something? I've not used TFS an awful lot.
I'm fully updated. I did some folder re-naming so possible it's a bug to do with that.

I can not reproduce this issue via the steps you provided. The file can be downloaded successfully on both PC with same account. Since you mentioned that you did some folder renaming, so you need to check if your local workspace mapping is still correct. An quick way to fix this is creating a new workspace for the project. This will get all the latest files on Version Control.
There are several ways to get the latest version:
Get the latest version from "Solution Explorer" by :right click on the project/solution file -> source control -> get latest version. This only updates all the files related to the project/solution to the latest version. For example, you have ProjectA and ProjectB in the solution, and you right click on ProjectA to get the latest version, the files listed under ProjectA in solution explorer will be updated/downloaded. Other files won't be updated.
Get the latest version from "Source Control Explorer" by :right click on the folder -> Get latest version. This will update all the files under the folder.

Related

Nuget files generated in Visual Studio

I'm working in a Xamarin.Froms project using Visual Studio 2015. I already connected the project to use VSTS to host the code.
The application is working as expected. However, all of the sudden in the Team Explorer Tab under Excluded Changes I noticed a bunch of unchecked file:
Not sure why the files in the images were generated. The App still is running as expected. But, should I check in those files in VSTS? Or is it safe to remove all of them?
Thanks in advance for your help.
All these files are .nupkg file (nuget package file) that stored in packages folder. These files is downloaded when you install packages and used to restore the packages for your solution. In other words, they are packages caches.
So if you could work with your project without check in to VSTS, the folder can be safely left out of the repository. But if these packages take a long time to download when restore them, I suggest you check them into VSTS, which can save a lot of time to download them from nuget feed.
There has other communities who has the similar issue, please refer to:
https://softwareengineering.stackexchange.com/questions/301547/should-we-include-nuget-package-folder-in-version-control

File gets excluded every time the latest code is taken from TFS

Let's understand the problem:
For our ASP.NET project using Visual Studio 2013 premium on a Windows 7 x64
On developer A's machine:
We've got a TFS setup
We added a new file A in the project
We checked-in the newly created file in the TFS source control
On developer B's machine:
We've got the same TFS setup
We forcefully took the latest (by specific option - overwrite option) version
File A gets loaded in the project, however it stays excluded
Developer B manually includes the file in the project
The files are well included and that is our concern. Why files which're included are getting excluded on other devs' machines?
The newly added files gets loaded on dev B's machine however they doesn't show up in the solution tree. We've to manually include them in the project after show all files
There's only one mapping on each dev's machine. The code is going to locally mapped workspace only
We've a little big team, so for every developer. It happens every time we take the latest version.
How do we suppress this behaviour? Is there a setting as such?
We've tried searching the web, couldn't find a solution.
It seems TFS automatically excluded the changes. You may encounter such a situation as below:
They're not loaded in your current solution, so Team Explorer assumes they're made as part of either a different solution and
that you don't want to check them in together with the changes that
do match the context you're in.
They're made in a different workspace, again Team explorer assumes you want to check in groups of files that logically make sense.
More detail info please refer the very detailed answer from jessehouwing in this question What are "Excluded Changes" in Team Foundation Server?
And if you are working with a little big team, the way you are using to "forcefully" take latest is not a recommend solution. Suggest you to still use get latest to download the files on the TFS server. Even though you may not obtain the "really latest version" of the file. You can still work on it and figure out the conflicts if there are during the check in action.
Update
If develop A has checked in the files, but not checked in the project file( .csproj file), then TFS will not download them if you execute a "Get Latest" by right clicking on the project or solution in Solution Explorer.
You will however get the files downloaded correctly if you right click and "Get Latest" on the folder in the source control window. But, they won't get loaded into your solution, because you haven't told TFS that they belong there.

Files missing from TFS restore

I've just created the simplest little project with a Program.cs file, checked it in to Visual Studio Online, deleted the project locally, and then tried to get the latest version from the online repository. The program file didn't download, even though Source Control Explorer shows it on the server:
Any idea why this won't download?
At this point there are no changes in the files since you last did a Get-latest to your workspace. Follow the below steps to get the files for your workspace:
Right click on the file/folder
Choose Advanced instead of Get Latest Version
Choose Get Specific Version
Check the "Overwrite all files even if the local version matches the specified version" box
This will force a download of all the files and not just files that have changed since the last time they were retrieved to your workspace.

My team members' Visual studio team foundation server cannot find files I checked in

We're using team foundation server as source control management tool. I checked in my projects and files . But when my team members get the latest version of code, what happened is they can find the files in file explorer but not in the visual studio solution explorer. This results in they have to add the files manually by clicking on adding existing items.
Anyone knows any possible root cause for this?
You checked in the files, but you also need to check in the updated solution (and/or) project files. Once they are checked in, have your teammates get the latest version of solution (and/or) project files.

Team Foundation Server- How to effectively set up source code layout with dependencies

I am currently trying to set up a new visual studio 2008 solution while using TFS.
Current structure is as follows
ProjectName
- src
* SomeSolution.sln
* ProjectFolder1
* ProjectFolder2
- Third Party Tools
In subversion I would just go to the root directory and do svn update. Or with Git, git pull origin from the root directory as well.
When in Visual Studio and I right click the solution and press "get latest version" I only get the latest src located in the solution. Is there a way withing Visual Studio where I could cleanly get the latest libraries as well? Or am I going to have to install the powertools on every developers machines so that they can update from windows explorer?
Using the Source Control window, right click on the ProjectName and select Get Latest Version
Or, add the Third Party files under a solution folder. That way you can continue using the file/directory structure you have set up, as well as be able to get latest just from getting latest on the solution file itself
As qntmfred said, Run Get Latest from the Source Control window. This is the only way to ensure that you get everything in the source tree you want.
We typically have an Assemblies folder in our main solution that all third party binaries used in that application are branched into. When the third part library is updated, we sync the branches with the relevant solutions that need them. All projects reference the assemblies from their locally branched copies. For example:
$TFS/
/ProjectName
SomeSolution.sln
/Assemblies
/Third Party (contains DLLs only)
/Websites
/ProjectFolder1
/ProjectFolder2
/Third Party Tools
/(tool name)
/bin
/src
You must install the TeamExplorer on all machines that access the TFS server. Just know this way. The "GetLastVersion" already overwrites files of the machine.

Resources