views:

124

answers:

1

Hello,

I've read all the info of how to build an issue tracker plug-in in C# for TortoiseSVN. I done that, building a class library with integration to my issue tracking (SalesForce).

I don't know how to install it to TortoiseSVN itself.

I've created a setup for the solution and I can install it (like JIRA solution that I found online).

I don't know what is missing. Please help, Oded.

I did what you wrote, made sure everything is correct. I don't get the name of the provider, but the GUID, and an error: alt text

what can it be?

A: 

1) You need to make sure that you have the right CLSIDs registered in the registry - so my installer inserts the following (fake) values:

(This, I think should be the equivalent of running RegASM as detailed at the bottom of the issue-tracker-plugins.txt file.

Installer Registry Changes Image

You should be able to import this registry file to get you started:

(You will probably have to dynamically update the CodeBase location, based on where the dll is installed to)

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}] @="FogBugzPlugin.MyPlugin"

[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\Implemented Categories]

[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\Implemented Categories{3494FA92-B139-4730-9591-01135D5E7831}]

[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\Implemented Categories{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]

[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\InprocServer32] @="mscoree.dll" "ThreadingModel"="Both" "Class"="FogBugzPlugin.MyPlugin" "Assembly"="MyAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31286c9d1d5aa00a" "RuntimeVersion"="v2.0.50727" "CodeBase"="file:///C:/Program Files/folder/AAAAAAAAAAAAA/MyAssemblyName.dll"

[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\InprocServer32\1.0.0.0] "Class"="FogBugzPlugin.MyPlugin" "Assembly"="MyAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31286c9d1d5aa00a" "RuntimeVersion"="v2.0.50727" "CodeBase"="file:///C:/Program Files/folder/AAAAAAAAAAAAA/MyAssemblyName.dll"

[HKEY_CLASSES_ROOT\CLSID{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\ProgId] @="FogBugzPlugin.MyPlugin"

2) You need to make sure that the user gets the BugTraq Associations added to the registry:

[HKEY_CURRENT_USER\Software\TortoiseSVN\BugTraq Associations\0] "Provider"="{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}" "WorkingCopy"="c:\" "Parameters"=""

(This can also be done manually by the user by going to TSVN -> Settings -> Hook Scripts -> Issue Tracker Integration -> Add

Where "{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}" is the GUID of the provider that you created.

All being well, the plugin should now be available to the user. when they open the commit dialog.


Update:

Troubleshooting the "Provider Shows As GUID" Issue seen above...

OK... so assuming your provider GUID is

{0DA7E319-1DCE-4A94-65555B5B6CE5}

You should check:

Your plugin implements IBugTraqProvider and IBugTraqProvider2 and has the GUID applied to it:

namespace FogBugzPlugin
{
[ComVisible(true),
     Guid("0DA7E319-1DCE-4A94-65555B5B6CE5"),
     ClassInterface(ClassInterfaceType.None)]
    public class MyPlugin : IBugTraqProvider, IBugTraqProvider2

So now you should have: GUID: 0DA7E319-1DCE-4A94-65555B5B6CE5 PluginName: FogBugzPlugin.MyPlugin

Go to regedit and have a look and see what you have in the registry. It should be along the lines of:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}]
@="FogBugzPlugin.MyPlugin"

[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\Implemented Categories]

[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\Implemented Categories\{3494FA92-B139-4730-9591-01135D5E7831}]

[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]

[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="FogBugzPlugin.MyPlugin"
"Assembly"="FogBugz2Tortoise, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31286c9d1d5aa00a"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/Program Files/folder/FogBugz2Tortoise/FogBugz2Tortoise.dll"

[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\InprocServer32\1.0.0.0]
"Class"="FogBugzPlugin.MyPlugin"
"Assembly"="FogBugz2Tortoise, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31286c9d1d5aa00a"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/Program Files/folder/FogBugz2Tortoise/FogBugz2Tortoise.dll"

[HKEY_CLASSES_ROOT\CLSID\{0DA7E319-1DCE-4A94-65555B5B6CE5}\ProgId]
@="FogBugzPlugin.MyPlugin"

You should also have the ProgID / CLSID entry directly under HKCR:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\FogBugzPlugin.MyPlugin]
@="FogBugzPlugin.MyPlugin"

[HKEY_CLASSES_ROOT\FogBugzPlugin.MyPlugin\CLSID]
@="{0DA7E319-1DCE-4A94-65555B5B6CE5}"

Hope this helps - I'd check the last point first.

djch
Does it means that I will have to manually configure for each user?
Oded
Probably - the bugtracker associations are stored in HKLU, so need to be created for each user - but this can be done in the TSVN UI, by selecting the installed provider and setting the paramaters (if any) and the working copy path.
djch
Working perfect. Although I do have a problem in my code. Whenever I'm in the function "GetCommitMessage2", I return string, but it crashes.Do you know why?
Oded
I'd Make sure you've implemented all of IBugTraqProvider2 - it may be down to not returning a string from OnCommitFinished or something.
djch