Perregrinne Posted October 10, 2019 Share Posted October 10, 2019 (edited) I think a lot of the information regarding how to build FileType plugins has become too outdated, and in some cases pretty much obsolete. A few places point to Simon Brown's template, but it doesn't even download a zip anymore, like it says it's supposed to. Midora made a template for Visual Studio 2010 which I'm using now, but it throws errors, like for FileTypeFlags, which are obsolete now. I dug through some current plugin repositories and eventually found some with the new method, but Visual Studio does not like like me using the SaveExtensions or LoadExtensions in the "new FileTypeOptions" block (it says SaveExtensions and LoadExtensions are not defined or imported, though SupportsLayers is found just fine). I can't tell if this is because the solution is from VS 2010 or there was something I was supposed to reference or hook up to the project. I would really like to create a new, modern template for FileType plugins and create explanations or documentation on how to use it, but I only just started making plugins for PDN today, and it's been a while since I last used C#. Does anyone already have any plans to do this? If not, maybe in time when I get better at this I can try. By the way, I'm currently using Visual Studio 2019 Community and .Net Framework 4.7.2 if that helps clarify the issues, and that's what I would use to develop a new template, if I did this. Edited October 10, 2019 by Perregrinne Clarification about VS 2019 Quote Link to comment Share on other sites More sharing options...
Perregrinne Posted October 10, 2019 Author Share Posted October 10, 2019 (edited) Well, the title of this topic seems to be pretty fitting, maybe I'll just keep adding little notes I learn to this topic. To get rid of the SaveExtensions error mentioned above, right-click your .csproj in the solution explorer and click "Properties". Then switch the target framework from .Net Framework 3.5 to 4.7.2 and don't forget to File -> Save All (Hotkey: ctrl+shift+s) afterwards. Edited October 10, 2019 by Perregrinne Typo in old framework. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 10, 2019 Share Posted October 10, 2019 16 hours ago, Perregrinne said: I would really like to create a new, modern template for FileType plugins ... Does anyone already have any plans to do this? Having more up-to-date example solution/project files would be nice for noobies, but you know what would be even better? Visual Studio Project Templates! For any confused people, these are Visual Studio Project Templates: We could have a VSIX package with the following template variations: FileType FileType<TToken, TWidget> PropertyBasedFileType Effect Effect<TToken> PropertyBasedEffect Links for more information: https://docs.microsoft.com/en-us/visualstudio/ide/how-to-create-project-templates https://docs.microsoft.com/en-us/visualstudio/extensibility/shipping-visual-studio-extensions Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 11, 2019 Share Posted October 11, 2019 (edited) In regards to my idea for a VS Extension, I've got a proof-of-concept working: I'll probably work on it some more over the weekend. If anyone wants to contribute or has additional ideas for it, let me know. EDIT: Get the templates here: https://forums.getpaint.net/topic/115325-project-templates-for-visual-studio/ Edited May 13, 2020 by toe_head2001 2 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 11, 2019 Share Posted October 11, 2019 Is this up on GitHub somewhere? 😁 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 11, 2019 Share Posted October 11, 2019 I'll put on GitHub when I get it more fleshed out this weekend. A few of the Templates don't actually work as intended yet. 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Perregrinne Posted October 12, 2019 Author Share Posted October 12, 2019 I look forward to playing around with these in my spare time, thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.