title: Is it possible to automate .Net assembly versioning using semantic-release?
body: <p>I have a C# solution containing a single project and multiple libraries using .Net 6. I'm using conventional commits (commitlint with husky) and want to use <strong>semantic-release</strong> to deploy the latest build as a ZIP file on Github based on the commit messages.</p>
  <hr />
  <p><strong>The setup I tried for C# projects:</strong></p>
  <ul>
  <li>Install packages</li>
  </ul>
  <p>.</p>
  <pre><code>npm install semantic-release -D
  npm install @semantic-release/changelog -D
  npm install @semantic-release/npm -D
  npm install @semantic-release/github -D
  npm install @semantic-release/git -D
  </code></pre>
  <ul>
  <li>Create a <em>.releaserc.json</em> file inside the root directory</li>
  </ul>
  <p>.</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;plugins&quot;: [
      &quot;@semantic-release/commit-analyzer&quot;,
      &quot;@semantic-release/release-notes-generator&quot;,
      &quot;@semantic-release/changelog&quot;,
      &quot;@semantic-release/npm&quot;,
      [
        &quot;@semantic-release/github&quot;,
        {
          &quot;assets&quot;: [
            {
              &quot;path&quot;: &quot;my-project.zip&quot;,
              &quot;label&quot;: &quot;my-project-${nextRelease.gitTag}.zip&quot;,
              &quot;name&quot;: &quot;my-project-${nextRelease.gitTag}.zip&quot;
            }
          ]
        }
      ],
      &quot;@semantic-release/git&quot;
    ]
  }
  </code></pre>
  <ul>
  <li>Inside the <em>package.json</em> file set the key <code>version</code> to <code>0.0.0-development</code>, set the key <code>private</code> to <code>true</code> and add a repository url</li>
  <li>Create a <em>release-on-push-on-main-branch.yml</em> file inside the <em>workflows</em> directory</li>
  </ul>
  <p>.</p>
  <pre class="lang-yaml prettyprint-override"><code>name: Release on push on main branch
   
  on:
    push:
      branches:
        - main
   
  jobs:
    release-on-push-on-main-branch:
      runs-on: ubuntu-latest
   
      steps:
        - name: Checkout repository
          uses: actions/checkout@v2
          with:
            fetch-depth: 0
  
        - name: Setup Node
          uses: actions/setup-node@v2
          with:
            node-version: 16.x
  
        - name: Install Node dependencies
          run: npm install
   
        - name: Setup .Net
          uses: actions/setup-dotnet@v1
          with:
            dotnet-version: '6.0.x'
   
        - name: Install .Net dependencies
          run: dotnet restore ./SolutionDir
   
        - name: Run build
          run: dotnet build ./SolutionDir
   
        - name: Run publish
          run: dotnet publish ./SolutionDir
   
        - name: Rename publish directory of MyProject to my-project and move it to root
          run: mv ./SolutionDir/MyProject/bin/Debug/net6.0 ./my-project
   
        - name: ZIP my-project directory
          run: zip -r my-project.zip my-project
   
        - name: Release
          env:
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          run: npx semantic-release --branches main
  </code></pre>
  <p>It seems to work, whenever I push to the main branch it will deploy the distribution (containing the DLL) with the latest version to the Github releases.</p>
  <hr />
  <p>But as you know semantic-release does not release the correct package version because it doesn't know about the assembly version yet. It takes the version from the <em>package.json</em> file.</p>
  <p><strong>What I want to achieve:</strong></p>
  <ul>
  <li>When making changes in libraries or apps inside the solution it should automatically increase their assembly versions based on the conventional commits. But obviously just if that project was modified.</li>
  <li>When running the release process semantic-release should release the project with <code>&quot;name&quot;: &quot;my-project-${assembly-version}.zip&quot;</code></li>
  </ul>
  <p>Is there something I can use?</p>