Announcement

Collapse
No announcement yet.

Help with Newtonsoft.Json error

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

  • #16
    Don't know if this is is at all significant - re your install.txt line

    Newtonsoft.Json.dll,.\bin\TankUtil,1

    No other install.txt's have the "1" flag, they are always "0".

    Comment


    • #17
      Originally posted by zwolfpack View Post
      Don't know if this is is at all significant - re your install.txt line

      Newtonsoft.Json.dll,.\bin\TankUtil,1

      No other install.txt's have the "1" flag, they are always "0".
      Yes, Updater docs are not super helpful about whether that is required. They only say "The file is an OCX or DLL file and needs to be registered using regsvr32." but no context as to when that will be needed or not. I figured it was safer to just let it do a regsvr32. Doesn't seem to be an issue on my Windows HS3 box but I can't say for certain that it isn't somehow causing the behavior he is seeing.

      When you say no others have 1 but are always 0, do you mean for the Newtonsoft JSON DLL?

      I can provide a zip and updater override file to see if it matters for this problem. Easy enough to do on my end.

      Comment


      • #18
        Originally posted by XboxMeister View Post


        When you say no others have 1 but are always 0, do you mean for the Newtonsoft JSON DLL?
        For any file - yours is the only one that has that flag.

        Comment


        • #19
          Originally posted by XboxMeister View Post

          Yes, Updater docs are not super helpful about whether that is required. They only say "The file is an OCX or DLL file and needs to be registered using regsvr32." but no context as to when that will be needed or not. I figured it was safer to just let it do a regsvr32. Doesn't seem to be an issue on my Windows HS3 box but I can't say for certain that it isn't somehow causing the behavior he is seeing.

          When you say no others have 1 but are always 0, do you mean for the Newtonsoft JSON DLL?

          I can provide a zip and updater override file to see if it matters for this problem. Easy enough to do on my end.
          You don't need that. It is used when the file is a real OCX and calls the dllregister function. The install may fail on Windows (perhaps) if that is specified. I installed on Mono who doesn't have that same concept so never saw this...

          Comment


          • #20
            OK, thanks for the feedback guys. I will go update my install.txt for future releases so it doesn't have that flag set. I'll double check obviously that it seems to work without it but I am sure you guys are correct about it. I've attached an updated version in a zip and an updater override file to see if that helps the OP. The only change from what the regular updater has is that I've changed the install.txt file to not do the regsvr32 on the JSON DLL.

            To use it I would:

            1) Disable and delete the TankUtility instance and plug-in in the Manage Plug-in screen. This should delete HSPI_TankUtil.exe in the HS3 root directory but you should double check it is gone.
            2) Delete all the TankUtility devices in HS3. The new plugin will rebuild them all anyway so better to start clean.
            2) Shut down HS3
            3) Delete the TankUtil INI files from the config folder
            4) Delete the bin/TankUtil folder (including the JSON DLL it contains)
            5) Put the updater_override.txt in the HS3 root.
            6) Put the zip archive in Updates3\Zips folder
            7) Restart HS3
            8) Go to Plugins->Manage and click on the Refresh button so it finds the updater_override.txt file and install the package.

            You will need to enter your credentials again in the Config page of course.

            Let me know if that resolves the error for finding the JSON DLL.
            Last edited by XboxMeister; March 13th, 2019, 03:53 PM. Reason: I removed the test attachments as they didn't solve the issue.

            Comment


            • #21
              It won't install
              Mar-12 16:41:05 Updater Install/Update of package Tank Utility failed.
              Mar-12 16:41:05 Updater Error Installation of package Tank Utility failed. The installation file 'HSPI_TankUtil_3-0-0-1.zip' does not exist. Please retry download.
              Mar-12 16:41:05 Updater Installing package Tank Utility
              Mar-12 16:41:05 Updater Using local file: HSPI_TankUtil_3-0-0-1.zip
              Mar-12 16:41:05 Updater Downloading update: Tank Utility
              Mar-12 16:41:05 Updater Starting download of updates

              Comment


              • #22
                I'm assuming you put it in the Updates3\Zips folder? Looks like it isn't finding it at all vs. a problem with the archive.

                Comment


                • #23
                  Ok restarted HS3 with admin privilege and recopied file and got it to install. Unfortunately, the JSON DLL error persists.

                  Comment


                  • #24
                    Ok got it to work. Modified the config file. Moved the probing path stuff to the start of the file.

                    Code:
                    <?xml version="1.0"?>
                    <configuration>
                     <runtime>
                          <loadFromRemoteSources enabled="true" />
                       <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                             <probing privatePath="bin/TankUtil" />
                       </assemblyBinding>
                        </runtime>
                      <system.diagnostics>
                        <sources>
                          <!-- This section defines the logging configuration for My.Application.Log -->
                          <source name="DefaultSource" switchName="DefaultSwitch">
                            <listeners>
                              <add name="FileLog"/>
                              <!-- Uncomment the below section to write to the Application Event Log -->
                              <!--<add name="EventLog"/>-->
                            </listeners>
                          </source>
                        </sources>
                        <switches>
                          <add name="DefaultSwitch" value="Information"/>
                        </switches>
                        <sharedListeners>
                          <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
                          <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
                          <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
                        </sharedListeners>
                      </system.diagnostics>
                      <startup>
                        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
                      </startup>
                    </configuration>

                    Comment


                    • #25
                      Hmmm, that is interesting. I notice the supportedRuntime part didn't get moved. Wondering if that is somehow causing an issue. I will have to experiment a bit with that file to see why that would matter. It is generated by Visual Studio when the plug-in is built.

                      Really glad you got it going. I was pretty much stumped as to what the problem was as I have no direct control over loading that DLL other than invoking functions it contains.


                      Update: the supportedRuntime part shouldn't matter and appears to not be valid directly under the <configuration> node anyway. Not sure why this was required but will investigate more and update my exe.config to do this moving forward. There is a note about the Newtonsoft DLL and setting up the probing privatepath for HS developers but it doesn't call out where in the XML file to locate the statement. Perhaps it is required under both <startup> and <configuration>.

                      Comment

                      Working...
                      X