Paint.NET file type plugin development
Paint.NET isn't very well documented in terms of what you need to do to develop a plugin. And if your plugin is intended to add support for a new file type, rather than add a new image-related effect.. then there's even less information. Luckily you can download a third-party template and use that as a base.
Ensure the project is set to use the .NET 3.5 framework (mine defaulted to 4.0). If this is not done correctly, then your plugin will be ignored by Paint.NET.
And that's pretty much the compile and test (or installation) cycle covered. Debugging is another matter. I'm not sure its possible with Visual Studio Express, but I think it is with the full version. I had to make do with custom message boxes, but it could be worse! :-)
For debugging, you might be interested in this post I made a few years ago on the forum: http://forums.getpaint.net/index.php?/topic/4209-how-to-debug-your-plugin/ . It may not work with VS Express though -- someone reported that it did not, but that was VS Express 2005 or something.
ReplyDeleteOh, and then 2 years later someone ("SeriousSam") posted a way to get it all working in VS 2008 Express.
ReplyDeleteAh.. I didn't read far enough down in thread after following your steps and failing to be able to follow them. Looks good, if I ever have a reason to revisit my plugin I'll definitely give it a shot :-)
ReplyDeleteBTW I did set up the post build step to copy the DLL into place and it failed everytime (most likely due to lack of permissions in Windows 7). When I manually paste the DLL in, I have to give it the Administrator confirmation. This is on 64 bit Windows 7 Home Basic.
Try running Visual Studio as Administrator. Copying to Program Files requires administrator privilege, hence the need to do this. Alternately, edit the security on the Effects folder to give yourself Full Control.
ReplyDelete