How to determine which Visual studio version used during TFS checkin - tfs

I am using TFS server 2015. I have different types of the project using different version of Visual studio: 2012/2015/2017/2019. From TFS how I can determine which version is used during check-in into TFS.
at the same time, I also want to know which MS Build version is using for TFS Build.

If you go to the diagnostics panel (needs admin rights), you can see the commands TFS/Azure DevOps Server receives and the user agent passed in:
You can find it under either
https://server/_oi
https://server/tfs/_oi
The user agent contains the version of the TFS Client Object Model, which matches the Visual Studio version when people are doing TFS related work.
Usage of the MSSCCI provider will show up with a different Object Model Version the the Visual Studio version. As these will log the version of Team Explorer which is launched.
There is no way to detect the MsBuild version from the server logs, but the csproj file will have an indication of the .NET framework version and the MsBuild version used. It should be possible to parse out this information straight from source control.
The ToolsVersion attribute should provide a nice hint.
The ToolsVersion attribute is also used for project migration. For example, if you open a Visual Studio 2008 project in Visual Studio 2010, the project file is updated to include ToolsVersion="4.0". If you then try to open that project in Visual Studio 2008, it doesn't recognize the upgraded ToolsVersion and therefore builds the project as though the attribute was still set to 3.5.
Visual Studio 2010 and Visual Studio 2012 use a ToolsVersion of 4.0. Visual Studio 2013 uses a ToolsVersion of 12.0. Visual Studio 2015 uses ToolsVersion 14.0, and Visual Studio 2017 uses ToolsVersion 15.0.
A second VisualStudioVersion may also be present:
Sub-toolsets become active in the presence of the VisualStudioVersion
build property. This property may take one of these values:
"10.0" specifies the .NET Framework 4 sub-toolset
"11.0" specifies the .NET Framework 4.5 sub-toolset
"12.0" specifies the .NET Framework 4.5.1 sub-toolset
Sub-toolsets 10.0 and 11.0 should be used with ToolsVersion 4.0. In
later versions, the sub-toolset version and the ToolsVersion should
match.

Related

Where in the Visual Studio installer do I find the BuildTools component?

In which Workload of the Visual Studio 2017 Community 15.9 installation would I find the VS2017 BuildTools component?
I am looking at the workloads in the installer options and there seems not to be any workload that has such a thing.
I even searched in the component in the Individual Components tab also but couldn't find anything matching the exact string.
The reason I am looking for it is that when I try to build the source code for ASP.NET MVC v5.2.6, I get the error message as follows.
> build
Could not find MSBuild.exe. Please install the VS2017
BuildTools component or a workload that includes it.
*** BUILD FAILED **
I had written to the ASP.NET MVC team earlier about this message before I had installed Visual Studio 2017. I had had just Visual Studio 2019 then and they asked that I install Visual Studio 2017.
I already have MS Build at various locations. I had multiple versions of MSBuild even before having installed VS 2017.
Build Tools for Visual Studio 2017 is still available as an online installer. You can get the current version here: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15.

How to get MSBuild 15 without a full install of Visual Studio?

"MSBuild is now installed in a folder under each version of Visual Studio." However, I do not want to install a full VS on the server. "MSBuild is now available as part of the .NET Core SDK."
Now that I've installed the .Net Core 2.1 SDK (and the 4.7.2 Framework), what is the path to msbuild.exe?
MSBuild.exe 15 was found after installing the VS Build Tools with no additional packages selected in the install interface.
Edit: Updated link above to go to older downloads. Expand 2017 panel, click Download, login with a Microsoft account, then you will see Build Tools for Visual Studio 2017 (version 15.9) in the list of available downloads.
Edit: increased minor version to 9 to reflect the latest of major version 15.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe

Build 2010 Project in TFS 2017

I have a 2010 project that needs built through TFS 2017. I am using the visual studio build task to do this.
The only options I am given to use are VS 2012 - 2017. Is there a way around this?
Visual Studio Build task has automatically set the /p:VisualStudioVersion property for us. And the versions only support VS 2012 - 2017.
The workaround is to use MSBuild task to specify MSBuild 4.0 version or specify the MSBuild location.
You must upgrade your project to use the minimum supported visual studio version on the build task.

How to set VS 2008 version option for TFS 2017 build definition

I am new to TFS and am trying to build an VB project created with Visual Studio 2008 using Team Foundation Server 2017 Build feature.
As you can see on the image below, I need to set the Visual Studio version on the Build Solution task and there is no dropdown option for Visual Studio 2008.
Is there anyway I can select VS 2008 to build this project?
Or is it possible to do this?
I will appreciate of any help I can get.
Based on the information provided from Microsoft at TFS Server Requirements, and specifically looking into the Client Compatibility / Visual Studio 2008 falls under the MSSCCI support category:
MSSCCI support
Visual Studio/Team Explorer 2008 and Visual Studio 2005 are no longer officially supported. To connect to the server, these clients must interface through the MSSCCI provider instead. MSSCCI support only includes support for source control integration and MSSCCI commands. The goal is simply to allow developers to continue working with legacy applications in an upgraded server.
I believe that, if you have to stick with Visual Studio 2008, you could use MSBuild step instead, and specify the proper location of the MSBuild 3.5, and verify if this would work for you:

Can an upgraded 2012 Build Template be used with older TFS server

I have upgraded my project that hast the Build Template to use 2012 (11.00 assemblies) and upgraded it to use .NET framework 4.5. I have also upgraded the Custom Activities project to use version 4.5 framework and use 11.00 assemblies.
I have several questions regarding this can i use this upgraded template with TFS 2010? At the moment our server which has TFS 2010 installed hasn't been upgraded to TFS 2012.
Also the custom activities that I use in the upgraded template, they look grey. Is this normal?
Custom Activities should match with the version of Team Foundation Build Services. As you are using TFS 2010 build services, it will throw errors for the custom activities compiled with 11.0 version.

Resources