Menu

--plgx-prereq-net:4.5 flag doesn't seem to work

Help
2015-11-26
2023-01-03
  • Koen Zomers

    Koen Zomers - 2015-11-26

    Perhaps by design, but when I specify --plgx-prereq-net:4.5 in my --plgx-create command, it keeps telling me when trying to start KeePass with this plugin in it's folder that the .NET framework is not present while it certainly is. If I provide the flag --plgx-prereq-net:3.5, it works fine. As the documentation doesn't mention 4.5 to be a valid value, perhaps it's just not supported. In that case it would be nice to add support for it as my plugin requires .NET 4.5.

     
  • Dominik Reichl

    Dominik Reichl - 2015-11-26

    I'm not sure about .NET 4.5, but .NET 4.6 installs into the 4.0.30319 directory. As the .NET detection of KeePass is based on directories, it cannot differentiate between 4.0, 4.5 and 4.6.

    Are you absolutely sure that you need .NET 4.5? Have you tested it with .NET 4.0? If it works with .NET 4.0, specify "--plgx-prereq-net:4.0".

    Best regards,
    Dominik

     
  • Kyrodan

    Kyrodan - 2015-12-10

    Hi,

    I have to add my comment her, too:
    I have the same problem like Koen. Today some third party libraries exist that traget at minimum .Net 4.5, 4.5.1, 4.5.2 or 4.6. They all use the same "core" .Net 4 (and all of these subversions are installed in this core folder). For a successfull compile (when using the PLGX) it is needed, that I can define the correct required .Net version. I saw in your code, how you determine the .Net version: you "only" look in the Microsoft.Net folder.

    Maybe you should take a look at this Microsoft article: https://msdn.microsoft.com/de-de/library/hh925568%28v=vs.110%29.aspx and add an improved check for .Net 4.x.x

    Daniel

     
  • Dominik Reichl

    Dominik Reichl - 2015-12-11

    I've now implemented a registry-based .NET Framework version detection, which should work for all versions up to 4.6 (and maybe also future ones).

    Here's the latest development snapshot for testing:
    http://keepass.info/filepool/KeePass_151211.zip

    Thanks and best regards,
    Dominik

     
    • Kyrodan

      Kyrodan - 2015-12-13

      Hi Dominik,

      I did a short try. I didn't get an error, when I provide "4.5" for "--plgx-prereq-net".
      But I can't test whether it works not due to the lack of testing machines without .Net 4.5

      Regards,
      Daniel

       
  • Cristian S.

    Cristian S. - 2023-01-03

    Hi Dominik,

    Might sound like a silly question, but is the "--plgx-prereq-net" build flag supposed to work with Mono as well?

    Thank you,
    Cristian

     
  • Dominik Reichl

    Dominik Reichl - 2023-01-03

    Yes, support for this has been added in KeePass 2.52 (see [1], [2]).

    Specifying --plgx-prereq-net:4.5 results in the plugin running only on .NET ≥ 4.5 or Mono ≥ 3.0 (this Mono version added support for .NET 4.5).

    Best regards,
    Dominik

    [1] https://keepass.info/news/n220909_2.52.html
    [2] https://sourceforge.net/p/keepass/patches/130/

     
    👍
    1
    • Cristian S.

      Cristian S. - 2023-01-03

      Thank you!

      In that case it explains why I got a strange error from a plugin created using --plgx-prereq-net:4.5 even if I had Mono version 6.8.0.105. The distro (OpenSUSE Leap 15.4) has an older package of KeePass (version 2.49). Tested with KeePass version 2.52 (just copy pasted the binaries from Windows) and the error is gone.

      For full context https://github.com/mihaifm/HIBPOfflineCheck/issues/33#issuecomment-1369873761.

       

      Last edit: Cristian S. 2023-01-03

Log in to post a comment.