tfsvisual-studio-2013checkinvsixcheckin-policy

VSIX Custom Checkin Policy not loading


I'm attempting to modify a custom Checkin Policy to work against Visual Studio 2013.

At first, I attempted to just add a new section to the manifest for 2013:

<VisualStudio Version="12.0">
    <Edition>Ultimate</Edition>
    <Edition>Premium</Edition>
    <Edition>Pro</Edition>
</VisualStudio>

and whilst this allowed it to install, it doesn't allow the policy to run (if I go to the policies>>Add section of TFS it's not present, and the policies throws an exception stating that the Policy is not registered).

After much hunting around, I thought perhaps there was an issue with the Policies.pkgdef - The Extension manager in VS2013 shows it as installed, but it's not showing as installed at Pending Changes. However I can't see any issue with it either:

[$RootKey$\TeamFoundation\SourceControl\Checkin Policies]
"VersionOneTFSPolicy"="$PackageFolder$\VersionOneTFSPolicy.dll"

I've opened it and compiled it in 2013, and fixed any reference issues so that it will compile correctly, but it still doesn't seem to like using it.

Does VS2013 manage Custom Checkin policies differently to 2010/2012? From what I can see it should just work with a manifest change and a recompile.

Edit

So I managed to get the custom policy running on VS2013 by upgrading the reference to Microsoft.TeamFoundation.VersionControl.Client from 11 to 12 and upgrading the project to .Net 4.5. However, this now renders the custom policy unusable on VS2012 (and I would assume 2010 too but I haven't tested that yet). Is there a way to have this run on 2010 through to 2013 from a single VSIX?


Solution

  • In the absence of any other solution, I reverted to the tried and tested method of updating the extension and building it as a new package. So simply having a 2012 version and a completely separate 2013 version.