简体   繁体   中英

Debugging TFS plugin locally

I'm working on writing my first custom TFS plugin, but I'm having a difficult time debugging it with my local TFS installation. I've been following this tutorial to get this up and running.

The plugin implements the ISubscriber interface to watch the WorkItemChangedEvent - the intent is to be able to automatically merge changesets related to a work item when said work item transitions from one state to another.

Currently I have the project set to output builds to C:\\Program Files\\<TFS Installation>\\Application Tier\\Web Services\\bin\\Plugins\\ , and have verified that both <ProjectName>.dll and <ProjectName>.pdb are generated in the plugins folder when I build my project - but the plugin doesn't appear in the modules panel! And, when I attach to the w3wp.exe process, my breakpoint starts giving me attitude:

The breakpoint will not currently be hit. No symbols have been loaded for this document. 

I've also got a few EventLog.WriteEntry(..) statements inside the event listener, but those don't seem to be logging either, so it seems like the plugin isn't running at all - I assume for the same reason.

I'm not entirely sure what would be causing this to happen, but I also haven't done much .NET coding for a couple of years, so I may be overlooking something pretty simple.

Can anyone think of a reason why this would be happening? If I need to provide more info, please let me know - I'll try and be as helpful as possible!

So I'm pretty sure the problem was because I had all of my build settings targeting x86 (which my dev machine - and subsequently my local TFS install - is running on). I changed builds to target All CPUs, and that seems to have done the trick...the plugin now shows up in the list of loaded modules, connects to the debugger, and logs events. I'm not sure why target architecture would have any affect on deployment though...but now I can start to actually build something...

TL;DR

Be careful messing with build configs if you don't know what you're doing!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM