title: Get assemblyname of a project
body: <h3>What I need</h3>
  <p>I want to obtain the assembly name of a Project in an Visual Studio Extension.</p>
  <p>Since I know that you can see it when right clicking on a Project in the Solution Explorer and select <code>Properties</code>. It will show the <code>Assemblyname</code> in the tab <code>Application</code>.</p>
  <h3>Setup</h3>
  <p>I have a &quot;Command&quot; in my extension project which shows when you right click something in the solution explorer. As soon as someone clicks the command the following code will execute:</p>
  <pre class="lang-cs prettyprint-override"><code>var dte = await GetDTE2Async();
  
  await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
  
  var selectedItem = GetSelectedItem(dte);
  var props = selectedItem.ContainingProject.Properties;
  //I just assumed that the `AssemblyName` could be somewhere in the `Properties` Property.
  </code></pre>
  <p>Where the <code>GetSelectedItem</code> method looks like this:</p>
  <pre class="lang-cs prettyprint-override"><code>public static ProjectItem GetSelectedItem(DTE2 dte)
  {
      ThreadHelper.ThrowIfNotOnUIThread();
      var items = (Array)dte.ToolWindows.SolutionExplorer.SelectedItems;
  
      return items.Cast&lt;UIHierarchyItem&gt;().FirstOrDefault().Object as ProjectItem;
  }
  </code></pre>