toe_head2001 Posted October 12, 2019 Share Posted October 12, 2019 (edited) These are Project Templates for Visual Studio. Note: Most plugin development can be done with CodeLab, and it remains the recommend solution. These templates are for people that know they need them. The templates allow for these six Paint.NET plugin types. PropertyBasedEffect Effect<TToken> Effect PropertyBasedFileType FileType<TToken, TWidget> FileType You can install them with this VSIX package: https://marketplace.visualstudio.com/items?itemName=toehead2001.PdnVsTemples Contributions are welcomed. The source code is here: https://github.com/toehead2001/pdn-project-templates-for-vs Edited May 10, 2020 by toe_head2001 4 Quote (June 9th, 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...
null54 Posted October 12, 2019 Share Posted October 12, 2019 Should the FileType templates provide a working example? The PropertyBasedFileType template currently has OnLoad return null, which will cause paint.net to show an error dialog. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 13, 2019 Author Share Posted October 13, 2019 59 minutes ago, null54 said: Should the FileType templates provide a working example? Yes! Feel free to submit a pull request(s). Quote (June 9th, 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...
TrevorOutlaw Posted October 13, 2019 Share Posted October 13, 2019 Awesome idea! I remember trying to work with EER via PM to get the template to work in VS and had heck of a time doing that. Hopefully this will overcome the issue beginner and experienced coders may have with utilizing VS to code effects or file plug-ins for PDN. Quote Paint.NET Gallery | Remove Foreground Object Tutorial | Dispersion Effect Tutorial Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 22, 2019 Author Share Posted December 22, 2019 I found the motivation to work on this again tonight. null54 extended the PropertyBasedFileType into a working file type, and I implemented FileType<TTokin, TWidget> & FileType based on his work. See the first post for an updated VSIX package. I really need some plugin authors to test these out. Once they're polished up, I'd like to publish the package on the Visual Studio Marketplace. The Marketplace makes it easy to find, install, and update VSIX packages. Quote (June 9th, 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...
NSD Posted December 22, 2019 Share Posted December 22, 2019 I really need more explanation on how to use this VSIX package. Does it work in VS Community 2017? So how to do it step by step after I open VS? Screenshots would be useful. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 22, 2019 Author Share Posted December 22, 2019 You just double click on the .vsix file, and it will install the templates into Visual Studio. I don't think I bothered with marking it as compatibility with VS 2017, but support can easily be added. Why are you not using 2019? Surely the screenshot in the first post is sufficient. There's not much else to show. Although, yes, it does look different in 2017 compared to 2019. Just create a new project in VS, and select one of the listed Paint.NET templates. Quote (June 9th, 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...
NSD Posted December 22, 2019 Share Posted December 22, 2019 After double click on unzipped .vsix file: Quote Link to comment Share on other sites More sharing options...
BoltBait Posted December 22, 2019 Share Posted December 22, 2019 Please post the contents of the install log. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
NSD Posted December 22, 2019 Share Posted December 22, 2019 Spoiler 22.12.2019 21:01:06 - ------------------------------------------- 22.12.2019 21:01:06 - Microsoft VSIX Installer 22.12.2019 21:01:06 - ------------------------------------------- 22.12.2019 21:01:06 - Initializing Install... 22.12.2019 21:01:06 - Extension Details... 22.12.2019 21:01:06 - Identifier : PaintDotNETPluginTemplates.b60ff1b7-9432-4d62-b199-6bf5e2914636 22.12.2019 21:01:06 - Name : Paint.NET Plugin Templates 22.12.2019 21:01:06 - Author : toe_head2001 22.12.2019 21:01:06 - Version : 0.0.3 22.12.2019 21:01:06 - Description : Project Templates for creating Paint.NET plugins. 22.12.2019 21:01:06 - Locale : en-US 22.12.2019 21:01:06 - MoreInfoURL : 22.12.2019 21:01:06 - InstalledByMSI : False 22.12.2019 21:01:06 - SupportedFrameworkVersionRange : [4.5,) 22.12.2019 21:01:06 - 22.12.2019 21:01:06 - SignatureState : Unsigned 22.12.2019 21:01:06 - Supported Products : 22.12.2019 21:01:06 - Microsoft.VisualStudio.Community 22.12.2019 21:01:06 - Version : [16.0,17.0) 22.12.2019 21:01:06 - 22.12.2019 21:01:06 - References : 22.12.2019 21:01:06 - Prerequisites : 22.12.2019 21:01:06 - ------------------------------------------------------- 22.12.2019 21:01:06 - Identifier : Microsoft.VisualStudio.Component.CoreEditor 22.12.2019 21:01:06 - Name : Visual Studio core editor 22.12.2019 21:01:06 - Version : [16.0,17.0) 22.12.2019 21:01:06 - 22.12.2019 21:01:06 - ------------------------------------------------------- 22.12.2019 21:01:06 - Identifier : Microsoft.Net.Component.4.7.2.SDK 22.12.2019 21:01:06 - Name : .NET Framework 4.7.2 SDK 22.12.2019 21:01:06 - Version : [16.3.29230.54,17.0) 22.12.2019 21:01:06 - 22.12.2019 21:01:06 - Signature Details... 22.12.2019 21:01:06 - Extension is not signed. 22.12.2019 21:01:06 - 22.12.2019 21:01:06 - Searching for applicable products... 22.12.2019 21:01:06 - Found installed product - Global Location 22.12.2019 21:01:06 - Found installed product - Visual Studio Community 2017 22.12.2019 21:01:06 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products. at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData) at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported) at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported) at VSIXInstaller.App.Initialize(Boolean isRepairSupported) at VSIXInstaller.App.Initialize() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject) Quote Link to comment Share on other sites More sharing options...
BoltBait Posted December 22, 2019 Share Posted December 22, 2019 Looks like the VSIX package is not compatible with VS2017. Can you upgrade to VS2019? Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
NSD Posted December 22, 2019 Share Posted December 22, 2019 Yeah, I think I'll do that next year. Merry Christmas everyone! Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 23, 2019 Author Share Posted December 23, 2019 @NSD , I've updated the VSIX package, so you should now be able to install it into VS 2017. Since you're one of the few people using 2017, let me know if you have any issues. I have done almost zero testing with 2017. Quote (June 9th, 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...
NSD Posted December 23, 2019 Share Posted December 23, 2019 Thanks @toe_head2001. The installation was successful. I was curious to see if the issue by resizing the Form was fixed, but unfortunately it is the same as the template provided by EER. Only manual input of width and height works. If you try to drag the corner of the Form to resize using the mouse, it flew off into outer space. Same discussion here: Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 23, 2019 Author Share Posted December 23, 2019 34 minutes ago, NSD said: I was curious to see if the issue by resizing the Form was fixed, but unfortunately it is the same as the template provided by EER That's not a template bug, but rather a bug with the Windows Forms Designer within Visual Studio. Future versions of the WinForms Designer will be (technically, already are) open source with .NET Core, so hopefully that bug can be fixed. Quote (June 9th, 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...
NSD Posted December 23, 2019 Share Posted December 23, 2019 Ok, thank you for the answer. However in WinFormsApplication this issue does not exist. Everything works fine. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 23, 2019 Author Share Posted December 23, 2019 That just means something in EffectConfigDialog exposes the bug in the WinForms Designer. Feel free to investigate a work around, and let us know if you find something. Quote (June 9th, 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...
kuenzign Posted December 24, 2019 Share Posted December 24, 2019 Any plans to add this to the Visual Studio Marketplace so that any updates to the templates can be automatically downloaded and installed just like any other Visual Studio extension? Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 24, 2019 Author Share Posted December 24, 2019 @kuenzign, https://forums.getpaint.net/topic/115325-project-templates-for-visual-studio/?do=findComment&comment=566368 Quote (June 9th, 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...
Ego Eram Reputo Posted May 3, 2020 Share Posted May 3, 2020 What's the trick in getting it to install to VS 2019? I'm only getting an option for 2017... EDIT: Nevermind. I went ahead with the 2017 install and the templates appear in 2019 too. Cheers Toe_Head! Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
toe_head2001 Posted May 3, 2020 Author Share Posted May 3, 2020 Oh, wow. I kind of forgot I was working on this project. It was working on VS'19 a few months ago. I'll take a look. 1 Quote (June 9th, 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 May 3, 2020 Author Share Posted May 3, 2020 I plan to publish this on the Marketplace sometime within the next week. Sorry it has taken so long. Quote (June 9th, 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 May 10, 2020 Author Share Posted May 10, 2020 The templates are up on the Marketplace: https://marketplace.visualstudio.com/items?itemName=toehead2001.PdnVsTemples 1 2 Quote (June 9th, 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...
Red ochre Posted August 19, 2020 Share Posted August 19, 2020 Hello toe_head2001, I have installed these templates into VS19 successfully (thank you). However I've run into a problem after creating a project using the Effect<TToken> template. My copy of Pdn is in C:\Program Files\NEWpdn\ so I had to add missing references. I built the project successfully, opened Pdn and found the new effect (custom U.I. with slider), however when selecting "ConfigDialog.cs[Design]" in VS19 it shows this error: "The designer must create an instance of type 'PaintDotNet.Effects.EffectConfigDialog`2[[MyCustomUIEffect1.MyCustomUIEffect1Plugin, MyCustomUIEffect1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[MyCustomUIEffect1.MyCustomUIEffect1ConfigToken, MyCustomUIEffect1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' but it cannot because the type is declared as abstract." I'm lost! Any ideas on how to correct this would be appreciated. ----------------------------------------------------------------- Suggestion: Can Build Events be added to the template? (from Null54's example in the old template thread). Great time saver if you remember to close Pdn before building. Pre-build [del "C:\Program Files\NEWpdn\Effects\$(TargetName).pdb"] Post-build [copy "$(TargetPath)" "C:\Program Files\NEWpdn\Effects" /y if "$(ConfigurationName)" == "Debug" copy "$(TargetDir)$(TargetName).pdb" "C:\Program Files\NEWpdn\Effects" /y] (NB. 'NEWpdn' would be replaced with the default location of Paint.net for the template.) Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
toe_head2001 Posted August 20, 2020 Author Share Posted August 20, 2020 9 minutes ago, Red ochre said: However I've run into a problem after creating a project using the Effect<TToken> template ... when selecting "ConfigDialog.cs[Design]" in VS19 it shows this error: The WinForms designer doesn't work with Generic types. There are a few explanations for this on stackoverflow, if you're inclined to look them up. You have to derive from the non-generic Effect type, if you want to use the WinForms designer. (you can technically have multiple levels of derivation to work around the issue, but that's a bit of a kludge) 16 minutes ago, Red ochre said: Can Build Events be added to the template? I thought I had added that to the templates... guess not. Feel free to submit a pull request on GitHub. 1 Quote (June 9th, 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...
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.