Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Visual Studio Code C# - Error MSB4062

    Plugin Development
    4
    7
    184
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DGutierrez3
      DGutierrez3 last edited by

      Hello everyone, some time ago I am trying to develop a plugin for Notepad++. But unfortunately without much success.
      Before giving up I would like to share my problem with you. Maybe they can give me a hand.

      My goal is to develop it with Visual Studio Code in C#. As a basis for may project I have downloaded the following Pack NotepadPlusPlusPluginPack.Net (I don´t know if there is a more updated version).

      However, when I complie the project I get the following error :
      09b2ab42-ebcb-4a07-8655-1ae18936e765-image.png

      How can i solve this error?

      Iteresting is that the *.dll Library is generated. However this is not compatible with Notepad++

      a002edb3-e345-4b17-bfa9-7d3866739d23-image.png

      The same question (with some extra details) I have posted in Stackoverflow.

      I would be happy receive any questions, suggestions or comments.
      Many thanks!

      Ekopalypse Alan Kilborn 3 Replies Last reply Reply Quote 0
      • Ekopalypse
        Ekopalypse @DGutierrez3 last edited by

        @DGutierrez3

        If you get back that this is an ANSI version then the call to IsUnicode does not return True.

        dail 1 Reply Last reply Reply Quote 2
        • Alan Kilborn
          Alan Kilborn @DGutierrez3 last edited by

          @DGutierrez3

          And since your plugin contains that function, you should be easily able to set it to return true!

          1 Reply Last reply Reply Quote 3
          • dail
            dail @Ekopalypse last edited by

            @Ekopalypse And just an FYI this error message from Notepad++ is a little too general. It usually isnt specific just for that function (though it is possible I guess), but at least it does indicate something is wrong with the DLL such as not having the correct symbols exported.

            1 Reply Last reply Reply Quote 4
            • Ekopalypse
              Ekopalypse @DGutierrez3 last edited by

              @dail - thank you.

              @DGutierrez3
              to make sure that the functions are exported you can use
              a visual studio command prompt and call dumpbin /exports YOUR_PLUGIN.dll

              something like

              dumpbin /exports PySnack.dll
              
              Microsoft (R) COFF/PE Dumper Version 14.16.27038.0
              Copyright (C) Microsoft Corporation.  All rights reserved.
              
              
              Dump of file PySnack.dll
              
              File Type: DLL
              
                Section contains the following exports for Npp.cp37-win_amd64.pyd
              
                  00000000 characteristics
                  FFFFFFFF time date stamp
                      0.00 version
                         1 ordinal base
                         7 number of functions
                         7 number of names
              
                  ordinal hint RVA      name
              
                        1    0 00367360 PyInit_Npp
                        2    1 003A4760 beNotified
                        3    2 003A8F50 getFuncsArray
                        4    3 003A7970 getName
                        5    4 003A4660 isUnicode
                        6    5 003A46E0 messageProc
                        7    6 003A79F0 setInfo
              
                Summary
              
                     5F000 .data
                      D000 .pdata
                     64000 .rdata
                      3000 .reloc
                      1000 .rsrc
                    4C2000 .text
              

              Forget about the PyInit_Npp, this is specific to my plugin but
              the other 6 must be there.

              Alan Kilborn 1 Reply Last reply Reply Quote 1
              • Alan Kilborn
                Alan Kilborn @Ekopalypse last edited by

                @Ekopalypse

                That might have been better as a “black” code box, as I was about to ask where to see PyInit_Npp

                Only almost just before posting did I notice the scroll bar on the far right. :-)

                Good info, though; I guess we all learned something.

                Ekopalypse 1 Reply Last reply Reply Quote 2
                • Ekopalypse
                  Ekopalypse @Alan Kilborn last edited by

                  @Alan-Kilborn said in Visual Studio Code C# - Error MSB4062:

                  That might have been better as a “black” code box,

                  Your definitely correct.

                  1 Reply Last reply Reply Quote 2
                  • First post
                    Last post
                  Copyright © 2014 NodeBB Forums | Contributors