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

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.

Related

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.

How to build FaceDetect/cnn_face_detection project on github?

I want to use the https://github.com/FaceDetect/cnn_face_detection project stored on Github repository but it shows so many different files and no proper documentation is available. Can anyone tell me how to build that github project into an executable?
If the github project has releases or tag, like tornado releases on github.
Then you can run
pip install https://github.com/project_name/archive/version.tar.gz
like this:
pip install https://github.com/tornadoweb/tornado/archive/v4.3.0.tar.gz to install the github online project.
But when the project does't have release tab. You need clone the project and compile from source.
In most cases, you can run python setup.py install.
The question has a python tag. So take python project as an example.
GitHub is mostly used for code. in various languages
How to make any github project usable or executable is specific to the language and to the kind of the project itself.
Also it need to be careful with the license terms, the state of reliability and completeness of the project you intend to work on (i.e: github.com/leezivin/FaceDetection_CNN – snakecharmerb); The fact that the specific project you mention, at the time, do not have a README.md and a license file jet , let's suggest to contact the author or someone contribute/commit the sources for any further informations.
btw the project you mention appears to be a c++ language project; so you need to be able to compile and link it ( Clean an Rebuid ) in some form of executable; The specific repo: cnn_face_detection contains Visual Studio solutions and projects therefore the easy way could be by using Visual Studio and open/import the artifacts ( it depends by version of visual studio you eventually can use ).
It is also required:
to choose if you intend to trust ( or not to trust ) the code:
to take care to the paths of the dependencies referenced by the prj because likely they need to be changed to the actual paths were you clone ( download ) the sources on your own filesystem. if don't do that you may not be able to compile the solution (i.e the three projects contained in the repo ):
By looking around the project, you will find folders named "VC2010" and "VC2006". This is a good clue that this is a Microsoft Visual C (or Visual Studio) based project. Inside you will find .sln and .vcxproj files, which are "solution" and "project" files, according to this list
Download and install Visual Studio from here. There are several options, try the Community edition first.
Download the source code of the project from github. To keep it simple you can just use "Download ZIP" button on the project home page.
Run Visual Studio and follow these directions to open one of the solution (.sln) files:
On the File menu, click Open Solution. The Open Solution dialog box opens.
Navigate to the solution you want.
Click the solution folder, which displays and selects the solution file within the folder. If no solution file is visible, verify that the value in the Files of type list box is Solution Files.
Click Open.
Build using these instructions. At this point you either have an .exe or a .dll (depending on which project you're building).

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

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.

Adding an existing folder to SVN outside of visual studio

I have created a repository online and I want to add an existing folder to it and make it version controlled. I am using TortoiseSVN.
When using Visual Studio I can just click "Add to Subversion" and it automatically adds the versioning to my project. When I click into the physical folder everything has icons next to it implying it's now versioned. I can then just commit it all either in or out of visual studio.
My problem is, I now have a folder that isn't part of a Visual Studio project that I want versioned. But I can't work out how to do it. If I click import I can import all the files but it doesn't add the versioning to the folder. I can then export it else where, but still I don't have the versioning.
What do I have to do to make my existing folder versioned without Visual Studio doing it?
You should read the SVNBook and TortoiseSVN manual. At least they'll help you to understand the concept behind Subversion and version-control in general.
When you svn import some folder to Subversion you can later get the working copy of this folder by doing a svn checkout operation in TortoiseSVN or a command-line client.
Whatever tool you are using in Visual Studio is using a subversion client under the hood - you can normally invoke this tool directly from the command line if wanted.
If you are not comfortable with that, you can download and install the free TortoiseSVN tool that integrates with the windows shell. Once installed, you can right click on the files/folders to add them to your repository outside of Visual Studio.
I have just worked out how to do this, so am answering my own question in case someone else is trying to do this:
Create the repository on the server,
svn import everything into it,
svn checkout what you just imported over the top of your existing folder.
Everything now will have ticks by it ready to commit!

Adding Visual Studio Project references to SVN

I checked in a project to SVN with about 15 references from one dev box then checked out the same project on a second dev box but most of the reference files are missing. Is it possible to checkin the reference files automatically?
Version control will only keep track of the actual files underneath the working folder. If the third party libraries are installed elsewhere on the machine, they will not be included in the source control at all.
You'll have to do one of these:
Ensure that the 3rd party libraries (eg, nunit, enterprise libraries) are installed on all required development machines.
Don't install the libraries using the normal installers at all, instead, add the individual dll's and other resources to source control as Vendor Branches, then bring them under your project by either branching them into your project location, or by adding an svn:externals definition.
Copy the required reference files under into your source locations, add them to source control and reference them from there.
I think it's hard for Visual Studio SCC tools to determine wether or not these files should be automatically added. If you're using the first scenario Jim T described, you definitely don't want that to happen.

Resources