Question

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?

Was it helpful?

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.

OTHER TIPS

I am trying to solve this as well, and from everything I have found, the only way to get extensions that target all versions is to actually create 3 separate (2010, 2012 and 2013) extensions, and install them using an InstallShield package that has each one as sub-features that get installed in sequence.

Upgrades are then done on each one individually as the VSIX is actually doing the install.

Links that may help you out on this include:

Single extension targeting VS 2012 and VS 2013

How to target an extension in both VS2012 and VS2010

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top