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.
Related
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.
I recently ran into a problem trying to use VS2019 with the TFS2018 vnext build system.
You cannot select VS2019 in the "Visual Studio Build" step, and selecting "Latest" does not use Visual Studio 2019.
On a test server, upgrading the server software from TFS 2018.3 to Azure Devops Server 2019 fixes the issue. Is there a simple work-around that would allow Visual Studio 2019 to be used without affecting the TFS server in a questionable way.
This question extends the question here:
Using VS2019 with TFS2018 vnext build system
Instead of using the Visual Studio Build step, I tried switching to the MSBuild Build step and specified the path to msbuild.exe as follows:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin
The build ran successfully and used Visual Studio 2019.
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:
After upgrade of Visual Studio 2017 last week on my build server, the MS Build 15.0 is not in use anymore. So whenever I try to compile visual studio 2017 projects which use new feature they will fail.
The Warning in build log is:
Visual Studio version '15.0' not found. Looking for the latest
version.
And the error is:
something.cs(542,41): Error CS1525: Invalid expression term 'int'
Which is because build server is using MS build 14.0 I guess.
So far I have
1- Uninstall and Reinstalled the Visual Studio 2017 on the build server.
2- Installed "Visual Studio Build Tools 2017".
And nothing works.
I have read some articles and apparently there are missing registry values but I don't know how to create them.
Appreciate your helps on this topic.
I am using TFS 2017 SP1 (On premises) and Visual Studio 2017 latest updates.
This may due to the VS is installed after the build agent configured. Then reregister the build agent with TFS, since the system capabilities are only discovered when the agent is first configured -- any changes made after that are not captured.
More ways please refer this similar question: No agent could be found with the following capabilities: msbuild, visualstudio, vstest?
Or install the latest version of the agent for now, which appears to be capable of detecting VS2017.
Also remember to select VS2017 in Visual Studio Version picklist of Visual Studio Build task.
I have resolved this issue by upgrading my TFS from TFS 2017 SP1 to
TFS 2017 SP2.
Thanks to #Patrick-MSFT and #Martin Ullrich for your help.
I have TFS2012 Update 3 server. We have started new VS 2013 project. I need to prepare build server and service. My initial thought is to install Vs 2013 together with TFS2013 build service.
After installation TFS2013 and registration to TFS collection I got below issue:
The register command is not supported for Team Foundation Service [our_tfs_url] because the server is not compatible.
Please advice any solution how to create builds for VS 2013 projects that are stored in TFS 2012.
Update 1:
1) I installed TFS 2012 build service and redirect msbuild ( toolpath) in build template to use VS 2013 msbuild
2) I am able now to build project with a test
3) There are still issue with Code Coverage, that finish with warning: Install visual studio. It seems for me that CC used still VS 2012. Is any way to redirect CC to VS 2013?
Below solution helps me build on VS 2013 build machine with TFS 2012 build service and generate code coverage.
TFS 2012 buid service runs tests from 11.0 location, to replace CommonExtensions in folder
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions
with Vs 2013 assemblies from
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions
fix that issue and now I can see code coverage per build.
thanks MS to provide workaround on that issue with Code coverage.