I need to destroy a build since deleting a build is not enough and I would like to use TFS Build Destroy. Unfortunately I cannot find it in 2015 since it only works with 2013 upon checking..
Is there a way to make it work for 2015? I'm trying not to resort to TFSBuild commands.
Just as Dave said, if you don't want to resort to the TFSBuild commands, you have to build your own extension.
You can reference the source code of TFS Build Destroy extension, try to modify/debug then build your own extension. Please refer to below link to get the source code:
https://tfsbuilddestroy.codeplex.com/SourceControl/latest
Related
I have following tools installed on my machine:
TFS 2017
Visual Studio 2017
MSBuild 14.0
In my application, I'm using some C#6 elements like string interpolation ($).
When I try to build it, controller says that it could not resolve the symbol.
Builds fail for both XAML and standard definitions.
In build logs, there's an information that it uses correct MSBuild 14.0 path: C:\Program Files (x86)\MSBuild\14.0\bin, but still failes to resolve C#6 elements.
I would really appreciate if you would help me with this problem, I've searched entire internet and found nothing :/
If you guys need any information, I'll be more than happy to provide it. Thank you.
TFS with XAML build is just using MSBuild to run the build. You could first try to use MSBuild command to run the build test locally, which will narrow down the issue.
If it works well on your dev machine and not works from a TFS server build. Very likely the environment problem.
To make sure the build successful, you should keep your build server environment the same with your local environment. Please double check this.
For trouble shooting, you could try to remote to your build agent, manually run your build and test on your build agent.
As for how to enable C#6, you could also refer this similar question, modify TFSBuildServiceHost.exe.config file which may do the trick. How do I enable C# 7 builds in Team Foundation Server 2015?
If you still get error, please include detail build failed logs here.
I am attempting to create an extension that will periodically check to see if the user has the latest version of all files in a specific project or branch. This specific project/branch is going to be determined by what item is checked out for editing. The reason for creating this extension is to create reminders every time a file becomes unsynced. This will prevent merging into items that are out of date.
I am also working with Gated Check-ins, so it would be advantageous if I could check for latest version after a gated build succeeds.
I am having trouble finding the APIs for TFS integration when making an extension for visual studio. I am also having trouble finding an API to use to make a direct TFS extension. I am assuming this is because everything that has to do with TFS commands should be done using TFS command line commands.
I am running TFS and VS 2015.
Thanks in advance for the help!
You can use NuGet packages of TFS API:
Microsoft.VisualStudio.Services.Client
Microsoft.TeamFoundationServer.Client
Microsoft.TeamFoundationServer.ExtendedClient
All the DLL's also stored in the following location, you can take them and use in your project:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer
A good tutorial on how to use the API you can find here.
Similar to this question, except we are not using TeamCity. The error I receive in TFS is:
The project file "xyz.rptproj" is not supported by MSBuild
and cannot be built.
In our old process (TFS 2013 XAML builds) we had to create a custom build template to call the IDE. I cannot seem to find a way to do this with TFS 2017. Is it as easy as having a PowerShell script call it?
I am having two separate build script written in TFS 2010. One is for application and other is for wcf service. I need to execute service build script from application's build scripts. Could someone please suggest how could I achieve this. Thanks.
To simply trigger one build after finishing another, you can use the tfsbuild utility that is installed on a system when you install Team Explorer.
You should be able to call it using
<Exec Command="$(VS140COMNTOOLS)\..\IDE\tfsbuild.exe start $(TeaFoundationServerUrl) $(TeamProject) DefinitionName" />
check the additional parameters here in the docs.
A list of useful environment variables available can be found here: http://www.woodwardweb.com/vsts/30_useful_team.html
Do note that the .proj files to orchestarte your builds are ancient (from the 2008 era) and have long since been outdated first by XAML builds and later by the new 2015 Build engine.
Team Foundation Server 2010 itself is no longer supported by Microsoft since June last year.
I'm running Visual Studio 2010, VisualSVN and TortoiseSVN.
Each time I use webdeploy to deploy the website, I'd like it to commit all of my files to SVN. What's the best way to accomplish this?
Visual Studio does a build when you hit the publish button. You can create a build configuration in VS2010 that executes commands after a successful build. You should install the command line SVN client and use that to execute a commit. Call the SVN command line client from the Build Configuration.
A more common approach would be to commit your change to the version control system instead of using WebDeploy. Then have a build server get the source from version control and incorporate the changes into the server. CruiseControl.NET is a good tool for doing that.
You should investigate https://github.com/loresoft/msbuildtasks which once installed and integrated into your project file, offer support for creating custom msbuild actions.
With it installed you can create 'SvnCommit' actions and associate it with a beforebuild or afterbuild target in your project file.
probably this is not the answer you are looking for - but I do not think you can get this out-of-box. I would suggest you to create a visual studio plugin and integrate it with SharpSVN (subversion client API) to achieve what you want.
UPDATE:
as #maddoxej mentioned, post-build action might work as well. However, I find it's easy to miss what configuration is selected - and press F5. And committing to SVN by accident is not generally a good thing.
Another option I thought about could be VS macro. Just record a macro which clicks deploy and then commits to SVN.
The answers that suggest making the check-in a build action is slightly flawed because the publication process will presumably increment a published build number as part of the publication process. This will modify the source code which will then need checking-in.