colindembovsky / ColinsALMCornerCheckinPolicies

TFVC Checkin policies (including Code Review checkin policy)
Apache License 2.0
27 stars 39 forks source link

Update for VS 2019 Please #27

Open essenbee opened 5 years ago

essenbee commented 5 years ago

Would it be possible to update this fantastic extension so that it is supported in VS 2019?

essenbee commented 5 years ago

Looking into this, I have had success by updating the following files:

extension.vsixmanifest:

<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011">
  <Metadata>
    <Identity Id="ColinsALMCheckinPolicies..dfc50aa1-4615-441e-96ca-14bee3946343" Version="3.20" Language="en-US" Publisher="colind" />
    <DisplayName>Colin's ALM Checkin Policies VS 2017</DisplayName>
    <Description xml:space="preserve">Colin's ALM Corner Custom Checkin Policies, including a Code Review Checkin Policy for VS 2017</Description>
    <MoreInfo>http://colinsalmcorner.com</MoreInfo>
    <License>license.txt</License>
    <Tags>Code Review; Checkin Policies</Tags>
  </Metadata>
  <Installation>
    <InstallationTarget Version="[15.0,17.0)" Id="Microsoft.VisualStudio.Community" />
    <InstallationTarget Version="[15.0,17.0)" Id="Microsoft.VisualStudio.IntegratedShell" />
  </Installation>
  <Dependencies></Dependencies>
  <Assets>
    <Asset Type="Microsoft.VisualStudio.Assembly" Path="ColinsALMCheckinPolicies.dll" AssemblyName="ColinsALMCheckinPolicies, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null" />
    <Asset Type="Microsoft.VisualStudio.VsPackage" Path="ColinsALMCheckinPolicies.pkgdef" />
  </Assets>
  <Prerequisites>
    <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
  </Prerequisites>
</PackageManifest>

and catalog.json:

{
    "manifestVersion": "1.1",
    "info": {
        "id": "ColinsALMCheckinPolicies..dfc50aa1-4615-441e-96ca-14bee3946343,version=3.20",
        "manifestType": "Extension"
    },
    "packages": [
        {
            "id": "Component.ColinsALMCheckinPolicies..dfc50aa1-4615-441e-96ca-14bee3946343",
            "version": "3.20",
            "type": "Component",
            "extension": true,
            "dependencies": {
                "ColinsALMCheckinPolicies..dfc50aa1-4615-441e-96ca-14bee3946343": "3.20",
                "Microsoft.VisualStudio.Component.CoreEditor": "[15.0,)"
            },
            "localizedResources": [
                {
                    "language": "en-US",
                    "title": "Colin's ALM Checkin Policies VS 2017",
                    "description": "Colin's ALM Corner Custom Checkin Policies, including a Code Review Checkin Policy for VS 2017"
                }
            ]
        },
        {
            "id": "ColinsALMCheckinPolicies..dfc50aa1-4615-441e-96ca-14bee3946343",
            "version": "3.20",
            "type": "Vsix",
            "payloads": [
                {
                    "fileName": "ColinsALMCheckinPoliciesInstaller.vsix",
                    "size": 2417578
                }
            ],
            "vsixId": "ColinsALMCheckinPolicies..dfc50aa1-4615-441e-96ca-14bee3946343",
            "extensionDir": "[installdir]\\Common7\\IDE\\Extensions\\3sisznc1.l04",
            "installSizes": {
                "targetDrive": 6867515
            }
        }
    ]
}

Hope that helps.

essenbee commented 5 years ago

I can submit a PR for this if that helps?

colindembovsky commented 5 years ago

Hi @essenbee - I haven't had a chance to look porting this extension in too much detail. I remember that I had to create a new version completely between 2015 and 2017 since the client dlls were different. I'm guessing I'll need to do the same for VS2019 - that is, update the manifest as well as the client libs. Have you tried compiling and running this version of the extension in VS2019?

essenbee commented 5 years ago

Hi @colindembovsky The PR does the manifest updates, and the extension loads into VS2019 fine, but it complains about not finding the Code Review Policy DLL, which I find odd, as that is not part of the extension as far as I can see...or is it?

image

colindembovsky commented 5 years ago

@essenbee that may be because the extension needs to update the client libs to 2019 assemblies. The extension loads via reflection I think, so you need the 2019 client libs linked in the extension project itself (not just update the target in the manifest in the setup project).

colindembovsky commented 5 years ago

@essenbee This is going to take way longer to upgrade than I have time (or inclination) for. The WITClient has been deprecated, which means that I'd have to update to the REST API to get work items etc. - essentially this entire extension requires a rewrite for VS2019. Not only would the work item queries need to be updated, but the tests are relying on those assemblies too, so the whole test project would need a rewrite.

I really think that teams should "rip the band aid" and migrate to Git - the code review flow is so much better in Git using Pull Requests - the "old-style" code review hasn't had any love since 2013 days, and it won't ever.

essenbee commented 5 years ago

I understand that @colindembovsky . This is probably the thing that will move us to Git repos at work. Many thanks. I may look into updating my fork of the solution, but it would be over a long period. If I do it, I'll add to the existing PR. Otherwise, thank you for developing this extension - we used it for many years without any issues.

ShadAhm commented 5 years ago

My team at work also happens to be relying on this extension. If I have time I will take a look at this.

NikolaR commented 5 years ago

Did not even see PR from soccerjosh, so I made update and PR of my own :( Anyhow, I've published a binary as well in case someone doesn't want to compile himself. Available here

onooka commented 5 years ago

Excellent plugin. We are waiting for the Visual Studio 2019 !!!

joshjohanning commented 5 years ago

Did not even see PR from soccerjosh, so I made update and PR of my own :( Anyhow, I've published a binary as well in case someone doesn't want to compile himself. Available here

Nice! I'm sure the vsix will be useful to a lot of people who rely on this :)

onooka commented 5 years ago

Hi Thanks very much for the information Best regards

On Thursday, July 11, 2019, 11:14:06 AM CDT, soccerjoshj07 <notifications@github.com> wrote:  

Did not even see PR from soccerjosh, so I made update and PR of my own :( Anyhow, I've published a binary as well in case someone doesn't want to compile himself. Available here

Nice! I'm sure the vsix will be useful to a lot of people who rely on this :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ilanmog commented 5 years ago

go to ColinsALMCheckinPolicies.csproj and replace the ref dlls to their 2019 folder

<Reference Include="Microsoft.TeamFoundation.Client, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.Client, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.ControlAdapter">
  <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.ControlAdapter.dll</HintPath>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.Controls">
  <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Controls.dll</HintPath>
</Reference>
<Reference Include="Microsoft.TeamFoundation.WorkItemTracking.Client, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.WorkItemTracking.Client.dll</HintPath>
</Reference>
nemanja228 commented 2 years ago

Updated for VS2022, x64 build. Basically did the same thing that @NikolaR did for VS2019, it still works. The process to update to REST API and update all tests is too tedious while these simple changes cover it. They may be deprecated in the future versions though.

Link to .vsix file. My fork.

eugeneflim commented 2 years ago

Any chance to get compiled VS2019 .vsix here please? Link to VS2019 doesn't work...

joshjohanning commented 2 years ago

@eugeneflim Looks like you can use the archive.org link to download the zip from.

or for posterity, here: ColinsALMCheckinPoliciesInstaller.zip

eugeneflim commented 2 years ago

Thanks!

Sent from my iPad

On Oct 19, 2022, at 9:13 PM, Josh Johanning @.***> wrote:

 @eugeneflim Looks like you can use the archive.org link to download the zip from.

or for posterity, here: ColinsALMCheckinPoliciesInstaller.zip

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.