Announcement

Collapse
No announcement yet.

question about Newtonsoft.Json.dll

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    question about Newtonsoft.Json.dll

    the version i have installed in VS19 is 13.0.0.0

    the version i have installed in HS4.2.5.0 is 12.0.3

    i now get the following error when trying to open a JUI settings page.

    Error finding plugin in GenPage: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    question: do i need to include the newer dll in my installation package to put it into my bin/insteon folder?
    Mark

    HS3 Pro 4.2.19.5
    Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
    Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
    Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

    #2
    Do you need version 13.0?

    If you do, put it on your subdirectory and have the exe.config file point to the path

    If you don't, just work with HomeSeer's provided version. I see I have a reference in my VS19 setup to a v12.xx. I'm drawing a blank on how (and from where) I got my Newtonsoft.JSON.dll component from in VS19, suspect I installed a package 2 years back and never looked back.

    Comment


      #3
      i found the following in the plugin.exe.config file. anything to update here?

      <dependentAssembly>
      <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
      </dependentAssembly>
      Mark

      HS3 Pro 4.2.19.5
      Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
      Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
      Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

      Comment


        #4
        i thought i needed the Newtonsoft.JSON packaged installed in VS19?
        Mark

        HS3 Pro 4.2.19.5
        Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
        Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
        Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

        Comment


          #5
          Originally posted by mnsandler View Post
          i thought i needed the Newtonsoft.JSON packaged installed in VS19?
          I'm, sure you do, need it. I apparantly have version 12.x installed but when I deliver my packaged code, I don't deliver the newtonsoft dll

          Comment


            #6
            I would include even if it was the same version because you are then independent of HS changes, which could force you to update your plugin.
            HS3 Pro Edition 3.0.0.435 (Windows 10 vmware)
            BLOccupied:,UltraNetCam3:,weatherXML:,RFXCOM:,Current Cost 3P:,UltraGCIR3:
            DMMQTT:,Kodi:,Z-Wave:,BLRadar:,EasyTrigger:,MySensors:,BLBackup:

            Comment


              #7
              I did have same issue https://github.com/HomeSeer/Plugin-SDK/issues/212

              I think in app.config the probing path is looking in bin/homeseer first, by swapping two pathes your plugin will load your newtonsoft.dll from your bin folder, if you supply it. Otherwise you need to setup binding redirects.

              <probing privatePath="bin/homeseer;bin/AKWeather" />

              Comment


                #8
                Alex,
                I actually put my bin/insteon path before the bin/homeseer path

                do i still need the following in the .config file? no really sure what it's supposed to do

                <dependentAssembly>
                <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
                </dependentAssembly>
                Mark

                HS3 Pro 4.2.19.5
                Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
                Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
                Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

                Comment


                  #9
                  It tells Windows to load 13.0.0.0 even if your app is build with 12.0.3

                  So it looks like this worked because it is looking for 13.0.0 - problem is it can't fid it. May be try removing the redirect?

                  Comment

                  Working...
                  X