How to use MSBuild Community Tasks in Team Build 2010? - tfs

How to use MSBuild Community Tasks in Team Build 2010? As you know TFS 2010 uses Windows Work Flow instead of Tasks and Target like previous version.
Many Thanks

MSBuild is still used to build your solution(s)/project(s). The simplest thing would be to install the Community Tasks on your build machine and reference them as you normally would from your solution's project files (*.*proj).

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.

MSBuild Missing from TFS 2015 Build Templates

I have upgraded to TFS 2015 Update 3 and can't find MSBuild in the available build templates. Only the following ones are available:
Any help to getting MSBuild installed would be appreciated.
I am on TFS 2015 update 2 and I don't see any MSBuild Build Templates available to me either. However, I would just use the MSBuild task after selecting the empty Build Template at the bottom of the picture you provided. I don't think a MSBuild Build Template exists for TFS 2015.
Also, whether or not MSBuild is installed is based on the Agent running your builds, not based on the build templates. You can see if your Agent can use MSBuild by viewing its capabilities under your agent pools at {tfs-name}:8080/tfs/_admin/_AgentPool
There's never been an MSBuild template. There has been, and still is, however, an MSBuild task. You can use the MSBuild task in any build definition.

To upgrade TFS build agent or not to upgrade?

I've searched for answers to my question on this forum and elsewhere, but so far unsuccessfully.
We are upgrading our toolset from VS2008/TFS2008 to VS2013/TFS2013. We now have TFS upgraded (phew!) but the big questions remaining are:
We have a single build agent using Team Build 2008 running on a Windows 7 x64 SP1 machine, with build results published to an old XP machine. Will the new TFS2013 server be able to work with it fully, or are we compelled to upgrade the build agent to Team Build as well? if so, does Team Build 2013 run on Windows 7 x64 SP1 or will we need a complete new server platform?
If we are compelled to upgrade the build agent to Team Build 2013, will/should our existing build scripts continue to work?
Can anyone advise?
The answer to your question is, "It depends."
The build system was totally redesigned in TFS 2010 to be based on Windows Workflow build process templates instead of MSBuild files. TFS 2010/2012/2013/2015 can all run old-style MSBuild files by using a build process template called "Upgrade Template". Whether they'll work immediately out of the box depends on how customized your MSBuild files are and what (if any) custom assemblies you're using. Custom assemblies may need to be recompiled, or may need code changes to continue to work.
TFS 2008 build agents do not work with TFS 2013. You will need to upgrade your build agents. However, TFS 2013 and 2015 build agents will both run on Windows 7 SP1, so you're good to go there.
The build system was revamped again in TFS 2015. My recommendation would be to get on TFS 2015 ASAP and skip the XAML build system entirely. The new build system is much easier to work with and can be extended with far less pain.
You are in a scenario with a fair amount of risk, especially if your business depends on your CI builds running regularly. Your best bet will be to do a test upgrade of your environment and validate what steps will have to be taken to ensure your builds continue to run against the Upgrade Template, or how much effort it will take to retire your MSBuild-based build templates and switch over to a newer build paradigm.
Regardless, I would strongly recommend making the move to TFS 2015 over 2013. Why go through the effort of upgrading from 2008 to 2013, only to still be a major version behind?

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.

Using _TEAM_BUILD_ with TFS 2010

We moved from TFS 2008 to TFS 2010.
With TFS 2008 I used _TEAM_BUILD_ in project file const to turn PostBuild event off when building by build server.
Now, when I create build definition with new format, without using tfsbuild.proj, but using Default template, it doesn't seem to work. I have PostBuildEvent running even though I am using same approach.
Any ideas how to achive same functionality, having PostBuildEvent running from Visual Studio and to be ignored on build machine?
Check for BuildingInsideVisualStudio. As you'd suspect, it's only defined when building inside Visual Studio. Alternatively, you could add "/p:_TEAM_BUILD_=1" to the MSBuild Arguments build process parameter of your build definition.

Resources