title: VS 2017 Check-in policy: the policy assembly is not registered
body: <p>I've carefully used <a href="https://stackoverflow.com/questions/42923272/custom-tfs-check-in-policy-in-visual-studio-2017#42933610">this answer</a> to build a .vsix for Visual Studio 2017 Professional such that a certain project with check-in policies is registered and used whenever I check-in some code to TFS.</p>
  
  <p>After the .vsix installation when I open Team Explorer and the Pending Changes page an error appears:</p>
  
  <p><a href="https://i.stack.imgur.com/F0vpw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F0vpw.png" alt="enter image description here"></a></p>
  
  <p>I've opened <code>privateregistry.bin</code> hive with regedit and I couldn't find a similar key with the one which I added for Visual Studio 2010.</p>
  
  <p>.pkgdef file:</p>
  
  <pre><code>[$RootKey$\TeamFoundation\SourceControl\Checkin Policies]
  "KeywordExpansionPolicy"="$PackageFolder$\KeywordExpansionPolicy.dll"
  </code></pre>
  
  <p>.vsixmanifest file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011"&gt;
  &lt;Metadata&gt;
      &lt;Identity Id="CheckInPolicies.761071af-97b8-4262-a392-35ff1ee54968" Version="1.0" Language="en-US" Publisher="publisher" /&gt;
      &lt;DisplayName&gt;CheckInPolicies&lt;/DisplayName&gt;
      &lt;Description xml:space="preserve"&gt;Policies: keyword expansion.&lt;/Description&gt;
  &lt;/Metadata&gt;
  &lt;Installation&gt;
      &lt;InstallationTarget Version="[15.0,16.0)" Id="Microsoft.VisualStudio.Pro" /&gt;
      &lt;InstallationTarget Version="[15.0,16.0)" Id="Microsoft.VisualStudio.IntegratedShell" /&gt;
  &lt;/Installation&gt;
  &lt;Dependencies&gt;
  &lt;/Dependencies&gt;
  &lt;Assets&gt;
      &lt;Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="KeywordExpansionPolicy" Path="|KeywordExpansionPolicy|" AssemblyName="|KeywordExpansionPolicy;AssemblyName|" /&gt;
      &lt;Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="KeywordExpansion.pkgdef" /&gt;
  &lt;/Assets&gt;
  &lt;Prerequisites&gt;
      &lt;Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" /&gt;
  &lt;/Prerequisites&gt;
  &lt;/PackageManifest&gt;
  </code></pre>
  
  <p>What could possibly go wrong?</p>