Jump to content

Get Paint.NET Version In Code


Recommended Posts

First, you need to get the installation directory. It's at HKLM / Software / Paint.NET / TARGETDIR (btw make sure you test your installer on 64-bit, otherwise I can guarantee you'll get some things wrong ...)

Next, do an Assembly.Load() on PaintDotNet.exe in that directory.

Last, call GetCustomAttributes(typeof(AssemblyVersionAttribute)) on that Assembly reference.

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

First, you need to get the installation directory. It's at HKLM / Software / Paint.NET / TARGETDIR (btw make sure you test your installer on 64-bit, otherwise I can guarantee you'll get some things wrong ...)

Next, do an Assembly.Load() on PaintDotNet.exe in that directory.

Last, call GetCustomAttributes(typeof(AssemblyVersionAttribute)) on that Assembly reference.

What namespace is that in?

KaHuc.png
Link to comment
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.

×
×
  • Create New...