Where can i find Microsoft.TeamFoundation.Controls.dll for TFS 2015 - tfs

I`m building an extension for Visual Studio Team Explorer and a line of code like this:
ITeamExplorer teamExplorer = GetService<ITeamExplorer>();
needs a reference to Microsoft.TeamFoundation.Controls.dll
which i couldn't find any where in TFS2015

I have VS 2015 Pro installed. Found it at
**C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer**Microsoft.TeamFoundation.Controls.dll

If you have Visual Studio 2015 installed you should be able to find it at C:\Program Files\Common Files\microsoft shared\Team Foundation Server\14.0\Microsoft.TeamFoundation.Controls.dll; at least, that's where it is on my machine.
Also, I'm not sure if it's required, but I also have the Visual Studio Extensibility Tools installed, which is one of the optional items listed during the installation of Visual Studio 2015.

You can search and find it under this path:C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions
I found it under C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\mcjvkcdg.wd1 on my dev machine.

Related

VCVARSALL.BAT for Visual studio 2019

What is the location of vcvarsall.bat file for Visual Studio 2019 (Preview and future release as well)?
Seems it is different from VS 2017 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat"
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat"
As it turned out the path is very similar, just without "Community" part:
For VS2019:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat
For VS2022 since the toolchain now is 64-bit:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat
If after installing the "Build Tools for Visual Studio 2019" and doing all that was recommended in the other answers, you still can't find the the file in the location mentioned (no Build folder inside Auxiliary) make sure you
Install "Desktop Development With C++ Workload"
because vcvarsall.bat is part of C++ workload.
(In VS, go Tools menu -> Get Tools and Features -> Install the Desktop Development With C++ workload)
You need to install the "Build Tools for Visual Studio 2019" which can be found here.
See the explanation:
You can build C and C++ applications on the command line by using tools that are included in Visual Studio. The Microsoft C++ (MSVC) compiler toolset is also downloadable as a standalone package from the Visual Studio downloads page. It's part of the Build Tools for Visual Studio package. You can choose to download only the tools you need for C++ development.
If you are using it in the pre-build event, you can execute the vcvars32.bat to set the environment variable VCINSTALLDIR and get rid of the Visual Studio version:
call "$(DevEnvDir)....\VC\Auxiliary\Build\vcvars32.bat"
Then
"%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat"
Note:
-In my tests, the variable VCINSTALLDIR has value only after executing the vcvars32.bat
-As Wei Yang said you need to install "Build Tools for Visual Studio 2019", it can be installed using Visual Studio Installer.
I felt free to add a possible solution.
1.) Open the Developer Command Prompt for your wanted VS if you have more than one installed. BTW this lets you work with TFS tool tf if you need it.
2.) Add in your make script the following code at the concerning location:
for /f "delims=" %%d in ('dir /s /b %VSINSTALLDIR%\vcvarsall.bat"') do #set myVCVARSALL=%%d
if not defined myVCVARSALL exit 1
call %myVCVARSALL%
Hope that helps to find this file for the wanted VS version. It results in different files for different installations.
I needed to install and build some older build tools for windows. So, I had to set the location.
The location is C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build
If you haven't installed the "Build Tools for Visual Studio 2019", you can do so from https://visualstudio.microsoft.com/downloads/.
Once this is done, the correct path for running vcvarsall.bat is;
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
For VS 2019 Professional, it is "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat this is the location.

TFS build dosn't complete correctly when I use c# 7 feature in my code

I've installed TFS (version 15.112.26307.0) on windows server 2012 R2. all team members use VS2017 to coding. I've created an agent (I've tried versions vsts-agent-win7-x64-2.112.0, 2.117.0 ,2.140.0)and set it's MSBuild version to MSBuild15.0 :
MSBuild15.0 has already installed on the server :
But when we use c# 7 features in our code(like "int out x") building code via TFS raise error as below (it use MSBuild14.0 to build our code, why?)
My agent capabalities is not correct :
Use the Visual Studio Build task. It allows you to specify the Visual Studio version used to run builds.
Seems the capabilities cannot be detected by the agent. If you have installed the VS 2017 on the build agent server, then you can try to restart the agent service to check if that works.
If that still not work, you could try below things:
Add the capabilities manually.
The path of them are(Enterprise version for example):
VisualStudio_15.0 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\
VisualStudio_IDE_15.0 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\
MSBuild_15.0 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\
MSBuild_15.0_x64 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\amd64\
VSTest C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common\IDE\CommonExtensions\Microsoft\TestWindow
Specify the path to Msbuild 15.0:

Why does TFS agent doesn't discover a VSTEST capability

We have TFS 2015 server and also a build server with Visual Studio 2017 Ultimate. TFS agent is not able to detect VisualStudio or VsTest capabilities (as it should) but when added manually, there is still a problem.
When it comes to Visual Studio Test step then console shows the following error and fails:
c:\AgentTest\tasks\VSTest\1.0.30\VSTest.ps1
Unable to determine the location of vstest.console.exe
I added the following capabilities manually:
VisualStudio C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise VisualStudio_15.0 C:\Program Files
(x86)\Microsoft Visual Studio\2017\Enterprise
VisualStudio_IDE C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\Common7\IDE
VisualStudio_IDE_15.0 C:\Program
Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE
VS150COMNTOOLS C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\Common7\Tools\
VSTest C:\Program Files
(x86)\Microsoft Visual
Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow
VSTest_15.0 C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow
This is my Visual Studio Test settings:
I can reproduce this issue, TFS 2015 agent cannot identify VStest and some other 2017 related capabilities.
Based on the test, TFS 2015 should not support for 2017 VStest.
According to this Github discussion, it seems that the core issue is the Visual Studio Test task needs updated to support VS 2017.
In TFS 2017 and VSTS, we can specify the absolute path of the vstest.console.exe to let it work (See this article for details), but in TFS 2015 we can not specify the path in the task, it's not support.
So, if you want to use Vstest, you can install VS 2015, or upgrade to TFS 2017 or later version.
Similar thread for your reference: https://social.msdn.microsoft.com/Forums/vstudio/en-US/1f9992f3-20b6-437a-855d-ccd67ff2298e/using-tfs-2015-with-build-agent-and-visual-studio-2017?forum=tfsadmin

How do you install TFS Command Line Tools for Visual Studio 2017

I've installed visual studio 2017 enterprise and the new stand alone Team Explorer 2017. There doesn't seem to be an option in either to add tfs command line tools or tfs shell integration. this implies that it's an extension, but I haven't found anything on the visual studio marketplace. I'd prefer not to reinstall 2015 to use the 2015 power tools, but there is no tf.exe anywhere on my box.
According to TFS 2017 RTW release notes, most of the previous Power Tools have been integrated into TFS 2017, that means no separate power tools, you don't need to install that separately. The Process Template Editor is one that has not been integrated, but you can get it in the Visual Studio Marketplace.
Visual Studio 2017 users: The tf.exe binary is no longer in a fixed
location in the Visual Studio install path as in previous releases
(for example, C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE). Scripts using tf.exe should not hardcode a path to the file based on the Visual Studio 2017 install path.
Just as mentioned by Dave, the tf.exe should be under the path :
C:\Program Files (x86)\Microsoft Visual Studio\2017\{Version: Enterprise,Professional,Community}\Common7\IDE\CommonExtensions\Microsof‌​t\TeamFoundation\Tea‌​m Explorer\TF.exe
In most cases, you run the version control command in the context of a directory that is mapped in the workspace. For example, $/SiteApp/Main/ is mapped to c:\\code\\SiteApp\\Main\\. To get the latest version of all items in the workspace:
c:\code\SiteApp\Main\SolutionA>tf get

Where is the TFS 2010 API DLL Microsoft.TeamFoundation.Framework.Server.dll?

This DLL is needed to reference the corresponding namespace Microsoft.TeamFoundation.Framework.Server. This DLL doesn't seem to be included with either the Visual Studio 2010 Team Explorer or the Visual Studio 2010 Team Foundation Server SDK.
This file can be copied from the server where Team Foundation Server 2010 is installed in the folder C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\bin.
The official place is
\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0
But I used:
\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ReferenceAssemblies\v2.0
because I'm on 64-bit Windows and I have VS2013.
http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.aspx
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies is the location for TestManagment client. But, you may need to download the stand-alone TeamExplorer first... Thanks Microsoft :(

Resources