I want to read fields from a .pubxml file during runtime. I'm working on a code base that uses a .pubxml file called "Production Publish Profile.pubxml". I'm unfamiliar with how publishing .NET programs is handled, and the lead developer has recently updated this process.
This file is located under the Project -> Properties -> PublishProfiles directory, and is structured roughly like so:
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ApplicationRevision>6</ApplicationRevision>
<ApplicationVersion>7.1.0.*</ApplicationVersion>
...
</PropertyGroup>
</Project>
What I'm looking to do is extract the Application Revision and Version fields during run time, so that I can insert those into necessary error logs. How can I access these fields freely, or at least read them when compiling the program?