TFS Build is failing Because of Missing Programs - tfs

I am trying to build a project using TFS2010 Build.TFS resides on its own server, and i am trying to build to a directory on the same machine. The Server does not have VS2010 installed on it.
When the build runs it fails and gives me this error:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1558): Task failed because "AxImp.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AxImp.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK. 2) Install Visual Studio 2010. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task.
Then I get a whole bunch of errors saying the namespaces of the project I am building cannot be found. I am not sure if that is all linked to the above mentioned error however.
Thank You!

It is recommended to have Visual Studio 2010 installed on your build machine but it is not a requirement. Since the error message indicates that it didn't find AxImp.exe, can you verify if this file exists on the build machine? The location is C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin (if you're on a 64-bit Windows).
If the file doesn't exist, installing .NET Framework SDK will probably help to resolve that specific error.
Regarding installing Visual Studio on the build machine, Visual Studio is licensed per user, not per machine, so as long as the build machine owner is licensed, you should not need extra license for Visual Studio. But you probably should look at the licensing papers for your edition of Visual Studio 2010 to make sure.
Here's a table in the white paper on licensing:

You need to have the same software running on the build server as you would if building locally. This means you need Visual Studio 2010, and possibly even the same edition of Visual Studio 2010, depending on what you're trying to build.

IMPORTANT REMINDER: Visual Studio is licensed PER USER. This means that as long as you as a user have a license, you can use that SAME LICENSE on your build Machine.
The only "problem" would be if you actually had "No licenses" - meaning you do not own a copy of Visual Studio at all, but have a legal copy of TFS.

Related

Jenkins slave machine Windows configuration

I am very new to Jenkins and sort of new to build .net application, but the guy left team so I have been assigned to do this. I have read tons of articles online about setting up Jenkins master, but little about slave configuration. The guy created a new slave and connect with Jenkins master successfully before he left. And he told me that slave is responsible for 1) downloading source code from TFS server and 2) building them.
now my issue is what do I need to install in the slave machine( windows system) to be able to perform that two tasks?
1) for downloading source code, do I need to install TFS client on slave ?
2) for building source code, do I need to install MSbuild or entire Visual studio ?
Thank you very much !
Assuming you installed a recent version of the Team Foundation Server Plugin, then no TFS Client is required (see https://github.com/jenkinsci/tfs-plugin#400-and-later-new).
Depending on what you are building, installing Visual Studio maybe required or not. In my experience, only a limited set of project types build with just MSBuild and without Visual Studio. There are hacks or supported tips but they work only in specific cases: YMMV.
The new Build Tools for Visual Studio 2017 RC are making this requirement a thing of the past: if you can migrate your code to Visual Studio 2017 you will be able to use them.

Internal error in Changeset Comments Policy after updating VS2015 to Update 1

Everything was fine about an hour ago, when i tried to checkin something, the policy friendly reminded me to "provide a comment for the check-in". Then I installed VS2015 Update 1, like some of my colleagues did, and after that, i receive the following error message when trying to check something in:
Internal error in Changeset Comments Policy. Error loading the Changeset Comments Policy policy (The policy assembly 'Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered.). Installation instructions: To install this policy, follow the instructions in CheckForComments.cs.
My colleagues, of course, don't. As far as i know since VS2012 there is no need to install any version of the Power Tools anymore, so why does this happen? Additionally I also have VS2013 installed, where i do NOT get that error message, that version is working perfectly. Anyone having any idea where i need to look?
Okay, i got it. Somehow the installation messed something up. On my machine the folder
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation
was pretty empty, where my colleagues had a junction there, leading to this folder
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\XXXXXXX
where XXXXXX obviously varies from machine to machine. To find the correct one, go to the extensions folder (one up) and look for the one that contains "Microsoft.TeamFoundation.Build.Controls.dll" and some other Teamfoundation dlls, then open an elevated command prompt and create the missing junction like so:
mklink /j "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\XXXXXX"
(watch out, you need to replace the XXXXX with the folder name on your machine)
- NOTE: Please dont forget to RESTART Visual Studio after doing this change in order to start cheking in seamlessly.
The suggested answer didn't work for me on VS 2015. I already had the junction, yet I was seeing the error.
https://devblogs.microsoft.com/buckh/internal-error-loading-the-changeset-comments-checkin-policy/ pointed me to this:
Cause
With VS 2005 through 2010, to get the Changeset Comments policy,
you had to download and install the Team Foundation Power Tools.
and I had to download and install Microsoft Visual Studio Team Foundation Server 2015 Power Tools.
It's available within VS here:
Visual Studio 2015 > Tools > Extensions and Updates:
VS needs to be restarted after this.

What version of Visual Studio is required for building Web/MVC apps using TFS Build?

We're deploying a set of Build Controllers and Agents throughout our infrastructure to build Web/MVC applications and deploy them using Release Management through TFS 2013.
I read that we need to have Visual Studio installed on the build machines to compile properly, and would like to know if we are able to use Visual Studio Shell (Integrated? Isolated?) or if we need to dedicate a full (Ultimate or Professional) Visual Studio to it.
Thanks in advance--
==Update 10:33 5/5/2014==
Due to the security restrictions placed on our development group, we are unable to use off-premise resources.
==Update 12:47 5/5/2014==
Installing the MSBuild Redistributable (via Erik Funkenbusch) was a good start, and following Jimmy's advice sealed it. Thanks!
The components needed to build Web Applications (of which MVC is a subtype) are in \Program Files (x86)\msbuild\Microsoft\VisualStudio\v12.0\WebApplications (or whichever version of VS you're building against). While these are installed by VS, you can just xcopy them to your build servers without the rest of the VS installation.
No, you don't need Visual Studio installed on the build machine, and wherever you read that... run far away, because they don't know what they're talking about.
In fact, it's explicitly recommended to NOT install Visual Studio on the build machine.
Microsoft has a full MSBuild redistributable with 2013 components. MVC is installed as part of the build via Nuget (along with other components).
http://www.microsoft.com/en-us/download/details.aspx?id=40760
In past years, you had to install the Windows SDK, and do a lot of manual configuration, and that was a pain. With 2013, they've made this much simpler.
I believe the Release Management should also have an installation setup file to install components for build servers....
You don't need Visual Studio for just doing compilation as part of the build process. If you have unit test cases which needs to be run then you need Visual Studio.

What am I doing wrong - problems building using TFS 2012

I am trying to get the most basic configuration of TFS 2012 up and running.
So far I installed the TFS server using the simplest option (the 1st option in the installer - the one that comes with a bundled SQL express),
I configured the build service (1 controller, 1 agent, both on the TFS machine).
My project consists of 2 parts: a C#/silverlight part, and a C++ part.
After adding the silverlight prerequisites the C# project builds correctly.
However I can't get the C++ project to build.
I guess I am missing a prerequisite since I am getting the following errors:
C:\Builds\1\proj1\Client\src\Code\Client\proj\main (VC11).vcxproj
(19): The imported project "C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\v110\Microsoft.Cpp.Default.props" was
not found. Confirm that the path in the declaration is
correct, and that the file exists on disk.
Indeed, the TFS server does not have a "C:\Program Files (x86)\MSBuild\Microsoft.Cpp" folder (while my dev machine has one).
I installed the windows SDK, but that didn't help.
I saw on some posts that I need to install VS 2012 on the build machine. Is that correct? will VS express do?
I have been banging my head on this for the last 2 days, and any help would be appreciated.
Installing Visual Studio on your build server seems like a strange thing to do, but having been around the TFS block a bit, I have found it to be the simplest way to manage build servers.
You can copy the files manually from your dev machine to your build server, but if an update to visual studio comes out, you will need to figure out what has changed and make sure you update all those files too. These files typically include Targets files and associated dlls.
Also with all the extensions and packages that are available now, it is just easier to load Visual Studio on your build server and install the required packages than try to work out what is needed to replicate the functionality.
This was made very clear to me recently when Microsoft released ASP.Net and Web Tools 2012.2. This altered the publishing pipeline for Web Sites and Web Projects and I needed to use this in my TFS build. It was so much easier to just be able to log onto my build server, load Visual Studio and download the new update.
I would definitely support installing Visual Studio on your build server.

Automated builds of BizTalk 2009 projects using Team System 2008 Build

I'm trying to configure automated build of BizTalk 2009 projects using Team Foundation Server 2008.
We have a staging server which has BizTalk 2009 installed. I ran the Team Foundation Server Build Setup on this server, and it can build non-BizTalk projects OK. However, BizTalk projects fail to build. I suspected something was amiss when "Deployment" was not a valid build type! I tried copying various things over from a developer PC which has BizTalk and Visual Studio 2008 installed, but still couldn't get it to work.
I don't really want to install Visual Studio on the staging server, but without it the "Developer Tools and SDK" option in the BizTalk install is greyed out. I guess I need this in order for BizTalk projects to compile.
So, my question is can a BizTalk 2009 server be used as a TFS build agent to build BizTalk projects without having Visual Studio installed. If the answer is no, what's the smallest part of VS that can be installed to get this to work?
Randal van Splunteren answered on MSDN:
There is a BizTalk installable feature called 'Project Build Component' (under 'Additional Software'). You can select/unselect it during installation of BizTalk. . . . It allows for builds without Visual Studio.
Be aware that you can only build stuff. For generating MSI packages you will need a BizTalk server (remote or on the build server itself).

Resources