Jump to content

paint.net 4.2.17 alpha build 7858 -- now using .NET 5!


Rick Brewster

Recommended Posts

Paint.NET has finally been migrated to .NET 5! If you're not familiar, .NET 5 (also known as .NET "Core" 5.0) is the new version of .NET that replaces .NET "Framework" (of which no more new versions will be made). More info here: https://devblogs.microsoft.com/dotnet/introducing-net-5/

 

It was a very large effort to move Paint.NET over to .NET 5 over the last 2 months! Most of that effort went towards rebuilding from scratch how Paint.NET is built and packaged (installer, MSI, APPX, portable ZIPs), because the old solutions were showing their age and were no longer serviceable. The app itself required only minor changes to work on .NET 5.

 

You should not really see any difference in the app's features or the way it behaves, although performance has improved. Sometimes substantially! Sadly there are some plugins that will no longer work, although I may be able to find fixes for some of them.

 

I will be releasing this via the built-in updater sometime later this week. For now, I want to start with a smaller audience, so you must download and install it manually. Just close the app, run the installer EXE inside the ZIP, and it will do everything for you (as usual):

 

 

You may also download a portable version of the app, which is useful if you just want to try things out or are not yet ready to fully commit to the new version. .NET 5 is built-in, so there is no need to install it (the app is "self-contained"). The portable version of the app will save settings in a local JSON file instead of using the registry.
 

 

If you have an ARM64 device such as the Surface Pro X, you may also install the app. For the portable ZIPs, use the architecture appropriate for your operating system: x86 for Win10, or x64 for Win11. This is untested, so please report back with how well it works.

 

Changes:

  • The app has been migrated to .NET 5, and performance has been greatly improved as a result.
  • Installation is much faster now due to no longer needing the "Optimizing performance for your system" stage (NGEN has been replaced with ReadyToRun via crossgen).
  • Portable ZIPs are now officially available, utilizing self-contained deployment, and do not require the installation of .NET 5. You must manually update to newer versions of the app, however.
  • Improved performance of most effects and other compute-intensive tasks by about 20% on average, due to .NET 5's improved code generation
  • Fixed a bug when saving with "Auto Detect" bit-depth that was causing fidelity loss on some images that already had 256 colors or less. This was reported here: https://forums.getpaint.net/topic/118401-images-already-with-256-or-fewer-colors-being-dithered-when-saved-with-palette/
  • Fixed a bug in Polar Inversion that was causing hangs
  • Improved performance of Polar Inversion by 3x, due to the aforementioned bug fix (and a little bit is due to .NET 5)
  • Updated the built-in AvifFileType plugin to v1.1.13.0 (courtesy of @null54). See the project's GitHub Releases page for more information.

 

Known Issues:

  • If you have a lot of plugins installed, such that the Effects menu is too large for the screen and must be scrolled, the scroll indicator buttons (the up/down arrows) are a lot larger than they should be. This seems to be a bug in .NET 5.
  • Edit: These were patched up in a later release and work fine now. No need to download an update for the plugins :)  Several of Ed Harvey's popular plugins are blocked because they are not compatible with .NET 5. I may find a solution for this, but it may also require a new version of the plugin to be released.
    • Color Flip/Rotate
    • Threshold
    • Glass Blocks
    • Color Filter
    • Filtered Black and White
    • Single Hue
    • Color Tint
    • Vitrious
    • White Balance
  • Like 2

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

5 minutes ago, gtopala said:

Surface Pro X Windows 11: the installer fails to install Visual C++ 2015-2019 Runtime (permission issue).

"Run as Administrator" works.

 

 

 

Ok thanks -- I've got a used SPX coming within the week from eBay, I should be able to test on that and get a fix.

 

I'm not even sure the VC++ Runtime/Redist needs to be installed on Win10/11...

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

With the portable new PDN version with .NET 5 built in what is the advice if you already have .NET 5 installed?

 

Last week there was an update to another, completely unrelated tool I use, which newly required .NET Runtime 5.0.7 to work so I installed it for that. I assume it is the same thing we're talking about here.

IHaveNoName.png

Link to comment
Share on other sites

51 minutes ago, IHaveNoName said:

With the portable new PDN version with .NET 5 built in what is the advice if you already have .NET 5 installed?

 

Having .NET 5 installed on your system won't be an issue; the portable copy of paint.net will use its own built-in copy of .NET 5, and ignore the installed one.

  • Like 2

(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

On 7/7/2021 at 12:21 PM, Rick Brewster said:

Sadly there are some plugins that will no longer work, although I may be able to find fixes for some of them.


It appears any plugin that relies on OptionBasedLibrarys fails to load.
This list appears in my errors tab.

 

C:\Program Files\paint.net\Effects\Align+.dll, version 0.7.0.0
C:\Program Files\paint.net\Effects\CircularText.dll, version 2.0.0.0
C:\Program Files\paint.net\Effects\ColorHarmonies.Effect.dll, version 0.7.0.155
C:\Program Files\paint.net\Effects\ColorMatrix.Effect.dll, version 1.1.0.22
C:\Program Files\paint.net\Effects\CustomCornerFrame.dll, version 1.0.4.0
C:\Program Files\paint.net\Effects\GraphPaper.dll, version 2.1.0.0
C:\Program Files\paint.net\Effects\ImageDistortion.dll, version 1.1.0.0
C:\Program Files\paint.net\FileTypes\ImPDF.Open.FileType.dll, version 1.1.0.0
C:\Program Files\paint.net\FileTypes\ImPS,EPS,AI.Open.FileType.dll, version 1.0.0.0
C:\Program Files\paint.net\Effects\JustifyText.dll, version 1.0.0.0
C:\Program Files\paint.net\Effects\mandala.dll, version 1.0.0.0
C:\Program Files\paint.net\Effects\MeasureObject.dll, version 1.5.0.0
C:\Program Files\paint.net\Effects\MeasureSelection.dll, version 1.5.0.0
C:\Program Files\paint.net\Effects\OutlineGradientText.dll, version 1.0.0.0
C:\Program Files\paint.net\Effects\ParallelLines.Effect.dll, version 1.6.0.575
C:\Program Files\paint.net\Effects\RoundedRectangle.dll, version 1.1.0.0
C:\Program Files\paint.net\Effects\SkewedRotatedText.dll, version 1.0.0.0
C:\Program Files\paint.net\Effects\TextDistortion.dll, version 1.3.0.0
C:\Program Files\paint.net\Effects\TextMask.dll, version 1.0.0.0
C:\Program Files\paint.net\Effects\WarpTextOnPath.dll, version 1.0.0.0

 

Other errors I get;

 

C:\Program Files\paint.net\Effects\BBChart.dll, version 1.0.7358.33924

System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'System.Windows.Forms.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

 

C:\Program Files\paint.net\FileTypes\SvgFileType.dll, version 1.0.0.0

Type: System.Web.IHttpAsyncHandler
System.TypeLoadException: Could not load type 'System.Web.IHttpAsyncHandler' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

 

Curtis Black and Ed Harvey plugins have always had issues. Still do.

 

That's enough errors to revert back to 4.2.16 until some corrections are made.
 

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

@AndrewDavid @Rick Brewster

 

The PSFilterPdn crash is due to the fact that it uses WCF for communication when running 32-bit plugins.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint 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

3 hours ago, Rick Brewster said:

Probably a good time to add support for loading effect DLLs from folder so they can carry dependencies like that with them.

 

That would also be useful for users to organize their Effects and FileTypes folders.

 

I am in the process of rewriting the PSFilterPdn communication protocol to remove the WCF dependency.

  • Like 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint 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

14 hours ago, AndrewDavid said:


It appears any plugin that relies on OptionBasedLibrarys fails to load.
This list appears in my errors tab.

 

 

Can you post some of the errors? 

 

Quote

 

C:\Program Files\paint.net\Effects\BBChart.dll, version 1.0.7358.33924

System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'System.Windows.Forms.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

 

 

@BoltBait's BBChart plugin is still marked pre-release, so he should release a new version that includes the System.Windows.Forms.DataVisualization DLL, found here: https://www.nuget.org/packages/System.Windows.Forms.DataVisualization/ . Just need to move the plugin to .NET 5 (you can use the try-convert tool), add the nuget package, and ship it.

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

Quote

 

C:\Program Files\paint.net\FileTypes\SvgFileType.dll, version 1.0.0.0

Type: System.Web.IHttpAsyncHandler
System.TypeLoadException: Could not load type 'System.Web.IHttpAsyncHandler' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

 

 

@AndrewDavid Oh that's funny, it's using a type from ASP.NET for some reason. You might be able to get this one working by installing the ASP.NET Core Runtime from here https://dotnet.microsoft.com/download/dotnet/5.0

 

However, the author of that plugin really shouldn't be using types from ASP.NET, they should publish a new version of their plugin.

 

image.png

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

Heh @Rick Brewster

All the errors are pretty much the same. Here's a few examples:

Spoiler

C:\Program Files\paint.net\Effects\Align+.dll, version 0.7.0.0

System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.7.9, Version=0.7.9.1561, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'OptionBasedLibrary v0.7.9, Version=0.7.9.1561, Culture=neutral, PublicKeyToken=null'

C:\Program Files\paint.net\Effects\CircularText.dll, version 2.0.0.0

System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.7.9, Version=0.7.9.1561, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'OptionBasedLibrary v0.7.9, Version=0.7.9.1561, Culture=neutral, PublicKeyToken=null'

C:\Program Files\paint.net\Effects\ColorHarmonies.Effect.dll, version 0.7.0.155

System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.7.3, Version=0.7.0.229, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'OptionBasedLibrary v0.7.3, Version=0.7.0.229, Culture=neutral, PublicKeyToken=null'

C:\Program Files\paint.net\Effects\ColorMatrix.Effect.dll, version 1.1.0.22

System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.7.9, Version=0.7.9.1569, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'OptionBasedLibrary v0.7.9, Version=0.7.9.1569, Culture=neutral, PublicKeyToken=null'

 

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

@Rick Brewster You are correct.

I have always had them in the Paint.Net folder and they worked fine. After moving them to the effect folder, the errors cleared.

 

This leaves 3 more unanswered errors

Spoiler

C:\Program Files\paint.net\FileTypes\ImPDF.Open.FileType.dll, version 1.1.0.0

System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.6, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'OptionBasedLibrary v0.6, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'

Type: OptionBasedFileTypes.FileTypeFactory
Version: 1.1.0.0
Author: Martin Osieka
Copyright: © 2014 by ComSquare AG, Switzerland
Website: http://forums.comsquare.ch/viewforum.php?title=Paint.NET Tools
System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.6, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'OptionBasedLibrary v0.6, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'
   at OptionBasedFileTypes.FileTypeFactory.GetFileTypeInstances()
   at PaintDotNet.FileTypeFactoryExtensions.FileTypeFactory1As2Wrapper.GetFileTypeInstances(IFileTypeHost host) in D:\src\pdn\src\Data\FileTypeFactoryExtensions.cs:line 32
   at PaintDotNet.Data.FileTypesCollection.LoadFileTypesFrom(Assembly assembly, IFileTypeHost fileTypeHost, IPluginErrorService pluginErrorService)+MoveNext() in D:\src\pdn\src\PaintDotNet\Data\FileTypesCollection.cs:line 269
 

 

C:\Program Files\paint.net\FileTypes\ImPS,EPS,AI.Open.FileType.dll, version 1.0.0.0

System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.6, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'OptionBasedLibrary v0.6, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'

Type: OptionBasedFileTypes.FileTypeFactory
Version: 1.0.0.0
Author: Martin Osieka
Copyright: © 2014 by ComSquare AG, Switzerland
Website: http://forums.comsquare.ch/viewforum.php?title=Paint.NET Tools
System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.6, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'OptionBasedLibrary v0.6, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'
   at OptionBasedFileTypes.FileTypeFactory.GetFileTypeInstances()
   at PaintDotNet.FileTypeFactoryExtensions.FileTypeFactory1As2Wrapper.GetFileTypeInstances(IFileTypeHost host) in D:\src\pdn\src\Data\FileTypeFactoryExtensions.cs:line 32
   at PaintDotNet.Data.FileTypesCollection.LoadFileTypesFrom(Assembly assembly, IFileTypeHost fileTypeHost, IPluginErrorService pluginErrorService)+MoveNext() in D:\src\pdn\src\PaintDotNet\Data\FileTypesCollection.cs:line 269
 

 

C:\Program Files\paint.net\FileTypes\SvgFileType.dll, version 1.0.0.0

Type: System.Web.IHttpAsyncHandler
System.TypeLoadException: Could not load type 'System.Web.IHttpAsyncHandler' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

 

 

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

Those ones need a different version of the OptionBased Library

 

Putting DLLs into the main app folder is a major anti-pattern and should never have been done 😕

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

2 minutes ago, Rick Brewster said:

Putting DLLs into the main app folder is a major anti-pattern and should never have been done 😕

 

It's the only way to avoid copies in the Effects and Filetype folder. These kind of libraries are more extensions of the standard libraries. That's a standard design pattern. 😉 But that's just my opinion.

midoras signature.gif

Link to comment
Share on other sites

11 minutes ago, midora said:

 

It's the only way to avoid copies in the Effects and Filetype folder. These kind of libraries are more extensions of the standard libraries. That's a standard design pattern. 😉 But that's just my opinion.

 

It's not standard. Don't do it. You'll need to fix your libraries ASAP to avoid this requirement. It doesn't matter if there are extra copies of the DLL in multiple locations.

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...