title: Put Assembly Version from AssemblyInfo.cs in Web.config
body: <p>I have this scenario, where I have the project's Assembly Version from AssemblyInfo.cs, for example 2.0.0 as below: </p>
  
  <pre><code>[assembly: AssemblyVersion("2.0.0")]
  </code></pre>
  
  <p>In addition, I would like to retrieve this AssemblyVersion and set it as part of the parameters in my web.config dynamically, such as below, for example: </p>
  
  <pre><code>&lt;my.config.group&gt;
      &lt;version versionNumber="2.0.0" /&gt;
  &lt;/my.config.group&gt;
  </code></pre>
  
  <p>I need to set the version number above, as the version number of my Assembly dynamically, to avoid having to modify it manually when something changes. </p>
  
  <p>This is required because of how a third party library we are using works. Therefore, it is not possible to fetch the assembly version using an alternative way. We must stick to the web.config. </p>
  
  <p>What is the neatest solution to achieve this? I was thinking of using a Powershell script Post-Build, however, I have little experience in Powershell so I wanted to know what is the best solution.</p>