toe_head2001

Project Templates for Visual Studio

Recommended Posts

Here's a preview of the Project Templates I've started working on.

 

You can install them with this VSIX package:

 

 

PaintDotNETPluginTemplates.zip

 

 

pdnTemplates.png

 

 

Contributions are welcomed. The source code is here:

https://github.com/toehead2001/pdn-project-templates-for-vs

 

Edited by toe_head2001
Change the minimum install target to VS v15
  • Upvote 4

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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)

 

Share this post


Link to post
Share on other sites

@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.

Share this post


Link to post
Share on other sites

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:
 

 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.