Jump to content

WinForms Designer can't open an EffectConfigDialog


Recommended Posts

With the recent version of paint.net, it seems the WinForms Designer can't open a form derived from EffectConfigDialog.

 

In VS 2022, the "loading" message appears for infinity.

 

However, VS 2019 is more informative, as it displays an actual error message:

image.png

  • Upvote 1

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

If I change the target to .NET 5, the designer loads up without issue.

Switching back to .NET 6 causes the error to show again.

 

This seems like a bug in .NET 6 rather than a bug in paint.net.

 

So... target .NET 5 while WinForm designing, and then switch back to .NET 6.

¯\_(ツ)_/¯

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

Properly documented for @Rick Brewster

Nice to see what I have been seeing for the past month.  Didn't report it because I thought it was a VS thing. I may have mentioned it before.

 

 

Build a new form based project in VS2022 without any references. I used the above to get it to link to Net 6.0

Without adding any code, add a blank form. Once you see it open properly, add references to Paint and then close the form.

Try to open the form and watch the designer try to open. Then you receive this error

 

Hopefully he can figure it out. :)

 

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

  • 3 months later...

Anyone got a fix for the Designer not loading?

 

Shift + F7 or Right-clicking EffectConfigDialog.CS > View Designer fails to load the designer with this error....

 

Timed out waiting for the design tools server process launch to complete.
Link to comment
Share on other sites

4 hours ago, Ego Eram Reputo said:

Anyone got a fix for the Designer not loading?

 

Shift + F7 or Right-clicking EffectConfigDialog.CS > View Designer fails to load the designer with this error....

 

Timed out waiting for the design tools server process launch to complete.

 

I have a similar problem as well. This is another reason why I target .NET 5/Paint.NET 4.300. 

 

 
 
  Failure has occurred while loading a type.
 
 
 
   
 
Instances of this error (1)
 
1.   Hide Call Stack
at PaintDotNet.Runtime.CleanupManager..cctor()

 

Error details in Windows Forms output (Paint.NET 4.3.10):

[12:27:12.1992851] REQUEST FAILURES: Sessions/InitializeRootComponent
                   Microsoft.DotNet.DesignTools.Client.DesignToolsServerException: The type initializer for 'PaintDotNet.PdnBaseForm' threw an exception. ---> Microsoft.DotNet.DesignTools.Client.DesignToolsServerException: The type initializer for 'PaintDotNet.Runtime.CleanupManager' threw an exception. ---> Microsoft.DotNet.DesignTools.Client.DesignToolsServerException: Failure has occurred while loading a type.
                      --- End of inner exception stack trace ---
                      --- End of inner exception stack trace ---

 

 

Link to comment
Share on other sites

2 hours ago, otuncelli said:

@Ego Eram Reputo @AndrewDavid

 

Looks like the issue has been fixed in the latest Visual Studio 2022 (version 17.1.4).

 

Thanks for this ^. I was using 17.1.1 - updating to 17.1.4 as I type. I'll report back on whether this solves the issue.

 

 

..nope :(

Link to comment
Share on other sites

@Rick Brewster

After successfully building a plugin and seeing it function in Paint.Net, I go back to VS and try to open the form. I receive this error.

Prior to building, the form worked fine. That allowed me to build it.

 

 

The plugin is built on Net 5. Could that be the issue? Or is it an issue with Paint.Net? 

 

After changing the plugin to Net 6.0, I now get this reduced error when trying to open the form.

 

I must be on the right track. The plugin still builds and will function in Paint.Net OK

 

Issue resolved. Found an error in the plugin code.

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

I don't know.

 

I never use the forms designer in Visual Studio, and none of Paint.NET's stuff is validated to work with it -- including the base EffectConfigDialog. Sorry. Someone else may be able to help or fix things.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 3 months later...

Anyone still having this issue?

 

The designer had been working okay for a while, but now the issue is back.

🤔

 

I'm going to spend some time on this tonight, and see if I can solve it.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

  • 2 weeks later...

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.

×
×
  • Create New...