Click here to Skip to main content
14,486,494 members

Dominic Burford - Professional Profile



Summary

Follow on Twitter LinkedIn      Blog RSS
6,526
Author
2,053
Authority
9,535
Debator
8
Editor
100
Enquirer
211
Organiser
2,746
Participant
I am a professional software engineer and technical architect with over twenty years commercial development experience with a strong focus on the design and development of web and mobile applications.

I have experience of architecting scalable, distributed, high volume web applications that are accessible from multiple devices due to their responsive web design, including architecting enterprise service-oriented solutions. I have also developed enterprise mobile applications using Xamarin and Telerik Platform.

I have extensive experience using .NET, ASP.NET, Windows and Web Services, WCF, SQL Server, LINQ and other Microsoft technologies. I am also familiar with HTML, Bootstrap, Javascript (inc. JQuery and Node.js), CSS, XML, JSON, Apache Cordova, KendoUI and many other web and mobile related technologies.

I am enthusiastic about Continuous Integration, Continuous Delivery and Application Life-cycle Management having configured such environments using CruiseControl.NET, TeamCity and Team Foundation Services. I enjoy working in Agile and Test Driven Development (TDD) environments.

Outside of work I have two beautiful daughters. I am also an avid cyclist who enjoys reading, listening to music and travelling.

 

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralManaging your Azure resources using Powershell scripting Pin
Dominic Burford13-Mar-20 6:42
professionalDominic Burford13-Mar-20 6:42 
GeneralIntroduction to Azure Cognitive Search Pin
Dominic Burford28-Feb-20 5:39
professionalDominic Burford28-Feb-20 5:39 
GeneralUpdating the version number in your .NET build pipeline Pin
Dominic Burford24-Feb-20 5:33
professionalDominic Burford24-Feb-20 5:33 
As part of our build process, I needed to version the assembly with the latest build number. This is the first step in the build pipeline. Initially, I investigated doing this using the dotnet command as below.
dotnet build MyProject.csproj --configuration Release /p:Version=%1
The %1 parameter is the latest build number and is passed into the script via a build step. This command will build the project using the arguments that have been specified and create the build articles in the bin folder. The built assembly that the command has created in the bin folder will correctly have the version number set as per the command. So if %1 has been set to 1.0.0.0 then right-clicking on the assembly (or EXE) in the bin folder will show a version number of 1.0.0.0. All of this works exactly as it should.

The problem I was having however, is that as part of our release pipeline, I deploy the web application to our Azure hosting. To deploy to Azure using the Azure deploy task you need to create a .zip file. I create the .zip file using an MSBUILD command. I don't create the .zip file from the previous dotnet build command. The MSBUILD command uses the current project files and creates the .zip file from them. Therefore the .csproj file needs to have the correct version number before I run the MSBUILD command which then creates the .zip file.

I therefore needed to find a way to update the version number in the .csproj file before I ran the MSBUILD command. That way the version number of the assembly that gets deployed to our Azure hosting will have the correct version number.

Here is part of a .csproj file showing the version number.
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <!--Need to update the version number below-->
    <Version>1.0.0.0</Version>
  </PropertyGroup>
</Project>
I began to investigate how to update the version number within the .csproj file directly. I thought I could implement a simple PowerShell (PS) script that would do this. Also, by updating the version number directly in the .csproj file (and it being the first step in the build pipeline) then every subsequent step that referenced the version number would be referencing the correct version number.

After some Googling and trial-and-error I came up with the following PS script.
cls

Write-Host "Versioning started"

"Sources directory " + $Env:BUILD_SOURCESDIRECTORY
"Build number " + $Env:BUILD_BUILDNUMBER

$csprojfilename = $Env:BUILD_SOURCESDIRECTORY+"\MyProject.csproj"
"Project file to update " + $csprojfilename

[xml]$csprojcontents = Get-Content -Path $csprojfilename;

"Current version number is" + $csprojcontents.Project.PropertyGroup.Version

$oldversionNumber = $csprojcontents.Project.PropertyGroup.Version

$csprojcontents.Project.PropertyGroup.Version = $Env:BUILD_BUILDNUMBER
$csprojcontents.Save($csprojfilename)

"Version number has been udated from " + $oldversionNumber + " to " + $Env:BUILD_BUILDNUMBER

Write-Host "Finished"
The environment variables $Env:BUILD_SOURCESDIRECTORY and $Env:BUILD_BUILDNUMBER are both provided by the build process as part of the Microsoft build environment. You don't need to do or set anything to have access to these. They are provided by the build environment straight out the box for free. In fact, there are many more such variables that are also available that you may find useful in your other build scripts and processes.

The PS script fetches the latest build number and the folder path of where the source files are located on the build server. It then reads the contents of the .csproj file as an XML document. The version number is set to the latest build number (as provided by the build environment) and then closes and saves the updated .csproj file. That's it. That's all you need to do to update the version number in your .csproj file.

I initially thought that this would involve some horrible string search and replace to update the .csproj file. Thankfully, PowerShell contains native support for manipulating XML files, and it was in fact much easier than I thought. So if you need to update your .NET project's .csproj version number, feel free to use this script.
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare

Home | LinkedIn | Google+ | Twitter

GeneralFinding a solution to an Azure web app deployment problem Pin
Dominic Burford23-Jan-20 23:51
professionalDominic Burford23-Jan-20 23:51 
GeneralStructured Logging Pin
Dominic Burford24-Dec-19 1:28
professionalDominic Burford24-Dec-19 1:28 
GeneralEnabling TLS 1.2 on your .NET application Pin
Dominic Burford11-Dec-19 23:11
professionalDominic Burford11-Dec-19 23:11 
GeneralThe new version of the app is (almost) ready for release Pin
Dominic Burford7-Nov-19 23:28
professionalDominic Burford7-Nov-19 23:28 
GeneralChunking your lists into multiple smaller lists Pin
Dominic Burford11-Sep-19 3:40
professionalDominic Burford11-Sep-19 3:40 
GeneralWriting flexible filters for your data using Predicates Pin
Dominic Burford16-Jul-19 6:11
professionalDominic Burford16-Jul-19 6:11 
GeneralRe: Writing flexible filters for your data using Predicates Pin
Slacker00716-Jul-19 22:09
professionalSlacker00716-Jul-19 22:09 
GeneralRe: Writing flexible filters for your data using Predicates Pin
Dominic Burford17-Jul-19 1:17
professionalDominic Burford17-Jul-19 1:17 
GeneralBlocking Asynchronous Code Pin
Dominic Burford4-Jul-19 22:11
professionalDominic Burford4-Jul-19 22:11 
GeneralDesigning and implementing flexible RESTful services Pin
Dominic Burford14-Jun-19 0:50
professionalDominic Burford14-Jun-19 0:50 
GeneralWriting asynchronous code with .NET Pin
Dominic Burford10-Jun-19 3:34
professionalDominic Burford10-Jun-19 3:34 
GeneralWeird Minification Behaviour in ASP.NET Core Pin
Dominic Burford28-May-19 3:54
professionalDominic Burford28-May-19 3:54 
GeneralThe Importance of Structure and Dilligence Pin
Dominic Burford24-May-19 6:14
professionalDominic Burford24-May-19 6:14 
GeneralWhen should you rewrite that legacy application? Pin
Dominic Burford22-May-19 0:03
professionalDominic Burford22-May-19 0:03 
GeneralImproving Your SQL Stored Procedures Pin
Dominic Burford2-May-19 5:47
professionalDominic Burford2-May-19 5:47 
GeneralPassing a list of items to a SQL stored procedure Pin
Dominic Burford27-Mar-19 0:55
professionalDominic Burford27-Mar-19 0:55 
GeneralSoftware development is like plumbing Pin
Dominic Burford8-Mar-19 5:12
professionalDominic Burford8-Mar-19 5:12 
GeneralVersioning a .NET Core 2.2 application Pin
Dominic Burford7-Mar-19 5:04
professionalDominic Burford7-Mar-19 5:04 
GeneralUsing tags with push notifications from Azure Notification Hub Pin
Dominic Burford17-Feb-19 23:21
professionalDominic Burford17-Feb-19 23:21 
GeneralSending Push Notifications with Azure Notification Hub Pin
Dominic Burford25-Jan-19 4:34
professionalDominic Burford25-Jan-19 4:34 
GeneralUnit testing a Xamarin Forms mobile app Pin
Dominic Burford13-Jan-19 21:59
professionalDominic Burford13-Jan-19 21:59 
GeneralApple development sucks Pin
Dominic Burford8-Jan-19 1:09
professionalDominic Burford8-Jan-19 1:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.