Hi,

After we upgraded our environment to Server Version 11.0.424.0 some of our extensions fail. While compiling the extension we saw the following output. We changed the ToolsVersion from 12.0 to 4.0 without success.

  • Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
      XMLUtils -> C:\Users\MyAwesomeComputer\AppData\Local\Temp\a105d767-5f3a-42e2-92ee-026ddbe4f126\Source\NET\bin\OutSystems.NssXMLUtils.dll

Our extension converts XML documents to a JSON structure. We saw errors related to the Newtonsoft package. We tried to add the package several times in Visual Studio code but after publishing a newer version of the extension above error pops up again.

  • Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

We already republished to full solution. 

Regards,

Jeffrey


Change Integration Studio MSBUILD's location from .NET Framework to the one bundled with Visual Studio. Usually does the trick.

Cheers!

Thanks for the response Armondo. We tried your suggestion but unfortunately without any success. It seems that the Integration Studio is missing content with the Newtonsoft package.

While we're opening the extension via Service Studio, our first step is to verify the extension. We got an error but normally it's quite simpel to resolve this one, by adding the Newtonsoft package to the solution. We have done that uploaded the solution but both errors as mentioned in my initial post keeps popping up. After we closed the integration studio and re-open the extension... the Newtonsoft package is not related to the solution anymore.

I find that weird, because as far as I recall, Newtonsoft is now added by default to the extension references? You can use nuget or even add the DLL manually. That should fix the issue.

Thanks again, and I tried but unfortunately it doesn't solve the issue.

Jeffrey Meijer wrote:

Thanks again, and I tried but unfortunately it doesn't solve the issue.

Any chance you can share the extension so I can take a look?


Armando Gomes wrote:

Jeffrey Meijer wrote:

Thanks again, and I tried but unfortunately it doesn't solve the issue.

Any chance you can share the extension so I can take a look?


Sure. See attachment.


I was able to compile it without any change. See attached.

Armando Gomes wrote:

I was able to compile it without any change. See attached.

Thanks Armando. I appreciate your effort a lot. It seems that we have issues with the Newtonsoft versions on our server. I'll open a support case as I'm pretty sure we can't resolve this.

Found conflicts between different versions of "Newtonsoft.Json" that could not be resolved.

  • .NET Compilation.

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "Newtonsoft.Json" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
      XmlToJson -> C:\Users\MyAwesomeComputer\AppData\Local\Temp\10b2f7fe-2c68-4b2a-b221-46d34db1870e\Source\NET\bin\OutSystems.NssXmlToJson.dll

Sure. Good luck with that :)

Hi,

Out of curiosity, are you updating from OS10 or OS9?

We had the same problem when we upgraded from OS) to OS10 because our applications were using the ARDOJSon and we had a conflict of versions. Replacing the calls to this library to the ones to the library provided by the platform solved the issue for us.

Cheers.

Hi,

We were already on OS11 but upgraded to the latest GA version. What do you mean by

  • Replacing the calls to this library to the ones to the library provided by the platform solved the issue for us.

Cheers

Hi, 

In our case, was the first version of OS10, and there was also a conflict between the version of the JSON library used by the platform and the one used by ARDOJSon that we were using at the time.
Once we replace the ARDOJson by the platform functions in our code, everything started to compile again.

But if you were already in OS11, than this is something for the Support to help you solve as it seems a problem with the platform upgrade version.

Cheers.

Eduardo Jauch wrote:

Hi, 

In our case, was the first version of OS10, and there was also a conflict between the version of the JSON library used by the platform and the one used by ARDOJSon that we were using at the time.
Once we replace the ARDOJson by the platform functions in our code, everything started to compile again.

But if you were already in OS11, than this is something for the Support to help you solve as it seems a problem with the platform upgrade version.

Cheers.

Thanks for the guidance. We already raised a ticket for support. I'll post the solution here.

Cheers


Solution

Our issue has been solved. For future reference hereby the solution. The reference path of the Newtonsoft property was incorrect. Most likely caused by installing the NuGet package. After we changed this to the correct path everything worked again as intended. 

 Path: C:\Program Files\OutSystems\Development Environment 11.0\Integration Studio\Newtonsoft.Json.dll

Solution

Nice that you found the solution (and thank you for sharing it with us) :)

Jeffrey Meijer thank you so much for posting the solution.

That fixed our errors, but it's a little concerning that it happened at all. Our extensions had been working fine for months until we updated the Outsystems server - was I as a developer supposed to know to use the OS reference to NewtonSoft instead of the nuget package? Was this documented somewhere and I missed it? 

MichaelR wrote:

Jeffrey Meijer thank you so much for posting the solution.

That fixed our errors, but it's a little concerning that it happened at all. Our extensions had been working fine for months until we updated the Outsystems server - was I as a developer supposed to know to use the OS reference to NewtonSoft instead of the nuget package? Was this documented somewhere and I missed it? 

Haven't seen any documentation so far nor that anyone could know. As far as I know this is a problem that only occurs while upgrading the server version. We reported this to OutSystems a while ago, but it seems that it hasn't been solved yet.