How to display build warnings in TFS alert email - tfs

The TFS alert email for completed builds contains a list of build errors.
We are using an on-premises TFS 2018 server (a.k.a. Azure DevOps Server).
However, I would like to see the list of build warnings, too.
I already read the numerous posts on modifying BuildCompletedEvent.xsl to tweak the appearance of the email and that all works well. Using the hack below to get the full XML input I found out that it does in fact not contain the build warnings.
Is there a way to modify/hack the TFS service that creates the XML input for the alert emails?
The information about this on the internet is a mash of bits and pieces for XAML-builds, pre-TFS-2010, post-TFS2010 servers, and Azure devops server/services with lots of dead links and loose ends.
I feel like I basically had to reimplement almost the entire email alerting stuff of the TFS server if I went down the road to create a custom subscriber for the BuildCompletedEvent event (a.k.a. BuildCompletionEvent).
So is there a reasonably economic, (i.e. simple) way to get this little extra information into the TFS alert emails?
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<textarea>
<xsl:copy-of select="/" />
</textarea>
</xsl:template>
</xsl:stylesheet>

Related

How program workitem horizotal tabs in the new workitem web layout of azure devops server 2019?

I'm using TFS 2017 update 1 on premises and now I have to upgrade to Azure DevOps Server 2019 on premises.
In TFS 2017 I used a custom xml process model and I programmed "layout tag" to realize workitem web interface with many horizontal tab in this way:
I just done the upgrade to Azure DevOps Server and I discovered that fields in the new workitem web interface are automatically vertically rendered, furthermore I didn't find all custom relations but only parent-child and related relations.
I guess it is possibile to program the new web layout form of DevOps Server 2019 in order to obtain the horizontal tabs like TFS 2017. What are xml tags to use in order to obtain horizontal tabs?
According to your description, seems you were using Tab XML element.
It's a Deprecated elements in new work item form with Azure DevOps.
All the other content of the work item is organized into Pages, represented as tabs on the form.
The Page element is similar to the deprecated Tab element. However, a
Page element can't be grouped or nested. One page defines one tab
within the web form.
Take a look at this blog-- New work item form in TFS 2017
The nested elements looks like below:
<WebLayout>
<Page>
<Section>
<Group> . . .
<Control> . . . </Control>
<Control> . . . </Control>
</Group>
</Section>
</Page>
. . .
</WebLayout>
A sample page label:
<Page Label="Details" LayoutMode="FirstColumnWide">
......
</Page>
More details about the related xml info please take a look at our official doc here-- WebLayout and Control elements

Unable to change "Reason" when adjusting state on work item type (TFS2013)

I'll start with I'm new to customizing TFS and my TFS team project is a 99% vanilla template of Microsoft Visual Studio Scrum 2013. So I think my issue might be obvious to someone. I'm also using VS PowerTools.
In a Scrum Task, when you change the status from To Do to Done, it defaults the Reason to "Work finished". I'd like to be able to select alternative reasons, so I went to the transition from To Do->Done and added a new reason called "Obsolete", then saved it back to the server. I've verified it shows up in the XML, etc.
When I change from To Do->Done, the reason is still greyed out and defaults to "Work finished"?
I created a new team project with the Agile 2013 template, and when you change the status from New->Closed you get the option to change the Reason to "Completed/Obsolete/Deferred/Cut". This is the basic functionality I was trying to mimic.
I don't see any unusual rules on any of the fields?
If you check out the XML for the form display you will see:
<Control FieldName="System.Reason" Type="FieldControl" Label="Reason" LabelPosition="Left" ReadOnly="True" />
If you change "Readonly='True'" to "Readonly='False'" you will get a pick-list when you change state.

Odata URI service troubleshooting

I have an OData URI generated by a consumer desktop application like so
http://localhost:32702/TBC/Projects/15f1360adb2e4008921b9b5bb849ae78/
Entering this into my browser I can view the atom XML and see collections that should be available
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<service xmlns="http://www.w3.org/2007/app" xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xml:base="http://localhost:32702/TBC/Projects/15f1360adb2e4008921b9b5bb849ae78/">
<workspace>
<atom:title>Default</atom:title>
<collection href="FeatureAttributes">
<atom:title>FeatureAttributes</atom:title>
</collection> -<collection href="Points">
<atom:title>Points</atom:title>
</collection> -<collection href="TotalStations">
<atom:title>TotalStations</atom:title>
</collection> -<collection href="Vectors">
<atom:title>Vectors</atom:title>
</collection>
</workspace>
</service>
So I then change my browser URI to include the Points collection or the Vectors collection
http://localhost:32702/TBC/Projects/15f1360adb2e4008921b9b5bb849ae78/Points
And it only returns the current date for each item I was expecting, no actual data. The count of items, however is accurate. I was hoping to be able to use this in a LinqPad or VB.Net query application, but I can't even get the browser queries to work. Is it me or is there an issue with the service? I've tried the URI in LinqPAD and in a test project with WCF Data Services and when I test the same URI I get a (500) Internal Server Error.
The vendor is not providing any support, so I was hoping someone here could give me some troubleshooting steps to show where the issue is at.
Edit:
I modified IE options > Content > Feed Settings by unchecking "Turn on feed reading view"
This allowed me to see the data from the returned entity collection. I can now try to use WebRequest to consume the XML data in a .net application.
Adding $metadata to the URI in the browser yields "Website cannot display the page". Which leads me to guess that only feeds are exposed and no services. I'm not sure if this is possible.
I'm still unable to use this URI in LinqPad or in visual studio using Add Service Reference. VS returns error "An error occurred while attempting to find service at URI.
I'm not sure about LinqPad, but "Add service reference" in Visual Studio expects a link to your $metadata endpoint or the service document (i.e., the first query in your question). You can access the Points collection using both of those tools as a secondary step.
I'm not sure why your $metadata endpoint is not showing up though. If you right-click and "view source", do you see the xml document there?

ActionLink not formatting an Area's URL correctly

I have an MVC 3 site that runs across three load-balanced servers. On one of the servers this link:
#Html.ActionLink("Admin", "Index", new { area = "Admin", controller = "Home" })
gets rendered correctly.
http://my1.mvcsite.com/Admin/Home
On the other two the URL comes out wrong.
http://my2.mvcsite.com/?area=Admin
None of the servers have MVC 3 installed on them so when I push changes I include the deployable assemblies. I know it's not problems with the routes because in other places I'm using fairly complex routes and these work fine on all three servers. Also manually typing routes into the browser works OK but not for the Areas on the two rogue servers.
The issue seems to be that two of the servers don't know anything about Areas, which seems very odd. Has anyone else encountered a problem like this and if so what did they do to remedy this?
Edit
All three servers are Windows Server 2008 R2 DataCentre and run IIS7
Me and a colleague have fixed this problem by removing this file from the Temporary ASP.NET Files from the two rogue servers.
MVC-AreaRegistrationTypeCache.xml
which was found here:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\06304885\908d56a6\UserCache
On the servers where the Areas were not mapped nor found the XML was as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!--This file is automatically generated. Please do not modify the contents of this file.-->
<typeCache mvcVersionId="3cff62e5-ef21-4e58-897f-d0f1eafd3beb" lastModified="10/09/2013 15:10:21"/>
Deleting this file, and re-starting the App Pool, causes it to be re-created and then the Areas work.
The file is now:
<?xml version="1.0" encoding="utf-8"?>
<!--This file is automatically generated. Please do not modify the contents of this file.-->
<typeCache lastModified="04/10/2013 15:45:02" mvcVersionId="3cff62e5-ef21-4e58-897f-d0f1eafd3beb">
<assembly name="MyMVCSite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<module versionId="a3ce0d47-e370-4176-a07b-76aec3a3c25c">
<type>MyMVCSite.Areas.Admin.AdminAreaRegistration</type>
</module>
This feels somewhat wrong in that I'm not certain as to why this occurred; but after two days of banging my head against a brick-wall it'll do.
This article seems to suggest that what I've found is a bug with MVC. I don't know if the issue is with MVC 3 only.
EDIT
Just found this link that suggests there might be a problem with MVC 4

two endpoints want to share the same ListenUri but I only have one

There are a lot of questions on this already but in other cases it seems people are trying to have multiple end points. In my case I only have one and only want one endpoint. My error occurs only if I enable Certificate transport security and only on my development machine.
I have a WCF service implemented via the ServiceRoute in MVC:
RouteTable.Routes.Add(new ServiceRoute("MyServices", new WebServiceHostFactory(), typeof(MyServices)));
The entire serviceModel consists of only this:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true">
<!--<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>-->
</standardEndpoint>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
When the transport security is commented out it works fine. Uncommenting the transport security results in:
A binding instance has already been associated to listen URI 'https://my.dev.machine.local/MyServices'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config.
I can take the code and put it in a different environment and it works as expected. WTF?!?
This was a bug in Visual Studio 2012 RC. Even though I was using VS 2010 having the VS 2012 RC installed caused this problem. Once I uninstalled it this problem was fixed. Just make sure you follow the specific uninstall instructions for 2012 because if you uninstall it using the "Uninstall a program" option in the Control Panel it will break VS 2010 ... I learned the hard way.

Resources