Does Task Runner Explorer support CI build servers? - visual-studio

I recently learned of Task Runner Explorer and am curious about it's capabilities. I use TeamCity and AppVeyor in my work and I'm wondering how it plays with CI tools. I took a quick look and can't see any targets added to my project's .csproj file.
Is there a quick and happy way to take advantage of these event hooks in a build environment outside of the IDE?

Related

Configuring Bamboo to use MS Build Xaml Template

My Project is slowly moving away from TFS and going over to Git and to Bamboo.
However, the project uses xaml files to direct how the builds work, run unit tests before building msi, etc.
What I am trying to figure out is how I can configure Bamboo to point to this solution in the same way it is done now. Has anyone have any experience of this and how to do it?
The XAML part of the TFS build is proprietary and will only work with TFS.
You'll need to recreate the build definitions in Bamboo as plans and then add the specific tasks you need to compile, test and package.

Developing in Visual Studio but using custom, non-msbuild build scripts

I'd like to start exploring options outside of msbuild for scripting my builds, like CAKE or FAKE.
What's the best practice for developing .NET Core in Visual Studio but using external build scripts? Like, how does this actually work in practice?
I'd like to continue to take full advantage of the VS environment, including Intellisense, package management, IDE features like Go To Definition, etc.
Do people somehow customize/override the VS F5 and/or Ctrl-Shift-B behaviors? Or do they use .csproj files and let VS and msbuild do its own thing until it's time to generate a "real" build, and then run their own scripts at that time?
Locally on your development machine you usually run build scripts from command line. You don't write build script to help you while developing. You write them that your code is verified by an automated build and that you automate processes like creating deployment packages, publishing nuget packages...
Most common practice is contionous integration approach. This means that when you or someone in your team commits/pushes code to the version control system(like git svn...) your selected continuous integration tool (like jenkins, team city...) pulls source code from version control system and runs your build script which for example compiles your code, run tests, creates deployment package.
I would also suggest that you take a look at flubu. Flubu is a cross platform build automation tool for building projects and executing deployment scripts using C# code. It's easy to learn beacuse you write your build script entirely in c#.
More about flubu can be readed here: https://stackoverflow.com/a/46776658/3118784

What is Manual Build?

Seems like a pretty obvious question but I haven't been able to find this anywhere online - but what exactly counts as building something manually? As in if I do Ctrl+Shift+B on Visual Studio is that manually building? Then how could I go from that to automated build (running it from command line?). All I know is that I am supposed to use MSBuild to do automated builds on a project that is currently built 'manually'.
What is Manual Build?
Whether you are using Visual Studio or MSBuild command to build is considered to be manual build. That because you need to build your project manually every time no matter you are using Visual Studio or MSBuild command. And the hot key Ctrl+Shift+B is a quick start mode to build project in Visual Studio.
If you want to automated build, you should consider 'continuous integration' For example, TFS(Team Foundation Server), Teamcity, etc. You can easily search those continuous integration info on the internet.
The biggest difference between manual build and automated build is that you should manually build your project every time when source code changes, but automated build will execute the build automatically by continuous integration tool when source code changes, no need to build your project manually.

How can I make sure that build steps are auto-detected by TeamCity 8.1?

TeamCity 8.1's build steps configuration page has a tantalising looking button:
Sadly, I am not worthy:
I can't find much documentation on what actually needs to be in the repository to have the step autodetected. There's a brief mention in the "What's new" for TeamCity 8.1:
TeamCity auto-detection mechanism supports most popular version
control systems and a wide range of build tools and technologies,
including: Maven, Gradle, Ant, NAnt, MSBuild, Visual Studio solution,
Powershell, Xcode, Rake, IntelliJ IDEA, as well as various command
line scripts.
and it's mentioned in the general manual:
Build steps are configured on the Build Steps section of the Build
Configuration Settings page: the steps can be auto-detected by
TeamCity or added manually.
but none of this tells me how it decides whether a particular MSBuild project/PowerShell script etc should be selected.
What does TeamCity look for when auto-detecting build steps?
When auto-detecting build steps, TeamCity peeks into version control system. For this process to take reasonable time, TeamCity only looks 2 levels deep into the source code tree. Moreover, if some suitable files were found on the first level, it does not go to second.
As for criteria for the build steps to be discovered:
For PowerShell build step, TeamCity looks for files with .ps1 extension
For MSBuild build step, TeamCity looks for files with .targets, .proj and .build extensions
For VisualStudio solution step, TeamCity looks for files with .sln extension
Please note, that if any files discovered were already configured by hand in some previous steps, they will not be discovered again

Best way to do Visual Studio post build deployment in a team environment?

I'm working in a team environment where each developer works from their local desktop and deploys to a virtual machine that they own on the network. What I'm trying to do is set up the Visual Studio solution so that when they build the solution each projects deployment is handled in the post-build event to that developers virtual machine.
What I'd really like to do is give ownership of those scripts to the individual developer as well so that they own their post build steps and they don't have to be the same for everyone.
A couple of questions:
Is a post build event the place to execute this type of deployment operation? If not what is the best place to do it?
What software, tools, or tutorials/blog posts are available to assist in developing an automatic deployment system that supports these scenarios?
Edit: MSBuild seems to be the way to go in this situation. Anyone use alternative technologies with any success?
Edit: If you are reading this question and wondering how to execute a different set of MSBuild tasks for each developer please see this question; Executing different set of MSBuild tasks for each user?
If you are using Visual Studio 2005 or later, project files are MSBUild files. Inside the MsBuild file, there is an "AfterBuild" target. I would recommend using this to do your deployment tasks, instead of the Post Build Event.
By using MSBuild tasks, you are more prepared to move into a Continuous Integration system like CruiseControl.NET, or Team City.
I'm not sure why all of your developers have their own virtual machines, it would seem at some point you'd want a central location where all developers work is built to ensure the code from all developers will integrate and build (this is a reason for using Continuous Integration systems). I'm sure you can find a way that CruiseControl.Net or Team City or one of several other choices can help you in this scenario. But as far as getting the initial setup, use MSBuild.
i'd look into MSBuild or ANT

Resources