I am trying to use an extension I recently built, but every time I try calling an action in that extension I get the following error:

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.

I believe a third party library I am using references Newtonsoft.Json version 12, but I noticed that Integration Studio does not allow you to include the Newtonsoft.Json.dll in your extension when you publish it.

I tried removing the reference in my solution (I don't directly call it so this doesn't cause any build errors), but I get the same error as above when trying to call the extension module.

I have also tried manually setting the path to a copy of the dll in the Integration Studio folder (instead of the path to the extension's bin folder), but the same error occurs then.

Has anyone else had a problem similar to this?

I'm using Integration Studio version 11.

Hi,

Why do you think you cannot include the file ?

In service studio you can add files on the reference folder in the solution explorer or through nuget.

Yo can include 3thnosrty  libraries as you would do if you build other applications with service studio.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi,

Why do you think you cannot include the file ?

In service studio you can add files on the reference folder in the solution explorer or through nuget.

Yo can include 3thnosrty  libraries as you would do if you build other applications with service studio.

Regards,

Daniel

I can add the library to my own solution without issue, but when I try including that specific library with the extension in Integration Studio I am given a warning message that states I cannot include it. I'm not able to attach a screen shot to show this right now, but I'll add one when I am able to. 

To get it included on the server it somehow must be present on the build server also, what kind of application are you building, web or mobile ? 

regards,

Wim

Wim van den Brink wrote:

To get it included on the server it somehow must be present on the build server also, what kind of application are you building, web or mobile ? 

regards,

Wim

This is being used in a web application.


Hello Trevor


I created an empty extension in Integration Studio 11. See the picture below, the extension already has Newtonsoft.json dll in it. The version was 11.xx. 


From VS, I opened the project and via Package Manager, installed Newtonsoft 12. See the screenshot below, Integration studio, updates the dll properly. 

Hope it helps !!!. 


I've done the same steps already, but this doesn't solve the actual problem I am experiencing. I can add the Newtonsoft.Json dll to my project without issue. The extension publishes without issue as well. However when I try calling on my extension I get the error message:

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.

I can verify that the dll is listed in the resources in Service Center, but I suspect the version is incorrect. I don't see a place to view the version number directly in Service Center though so I'm only guessing on that.



Trevor wrote:

I've done the same steps already, but this doesn't solve the actual problem I am experiencing. I can add the Newtonsoft.Json dll to my project without issue. The extension publishes without issue as well. However when I try calling on my extension I get the error message:

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.

I can verify that the dll is listed in the resources in Service Center, but I suspect the version is incorrect. I don't see a place to view the version number directly in Service Center though so I'm only guessing on that.




I'm having the same issue with the Newtonsoft.Json.dll file.  When I publish my extension, I get an overwrite warning, but the file is overwritten with a file which is not the latest version.  The last modified date of 03/24/2018 17:44:14 coincides with the 11.0.2 version. However, using version 11.0.2 did not fix the issue for me either. I'm still getting the same error Trevor gets.

Kyle Tipton wrote:

Trevor wrote:

I've done the same steps already, but this doesn't solve the actual problem I am experiencing. I can add the Newtonsoft.Json dll to my project without issue. The extension publishes without issue as well. However when I try calling on my extension I get the error message:

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.

I can verify that the dll is listed in the resources in Service Center, but I suspect the version is incorrect. I don't see a place to view the version number directly in Service Center though so I'm only guessing on that.




I'm having the same issue with the Newtonsoft.Json.dll file.  When I publish my extension, I get an overwrite warning, but the file is overwritten with a file which is not the latest version.  The last modified date of 03/24/2018 17:44:14 coincides with the 11.0.2 version. However, using version 11.0.2 did not fix the issue for me either. I'm still getting the same error Trevor gets.

Unfortunately I worked with OutSystems support on this issue and was informed that you cannot use later versions of the Newtonsoft.Json dll. There is no workaround that I am aware of. Unless you are able to downgrade your library to use an earlier version that is supported by OutSystems you are just out of luck (which is what happened to me).


I think this might be an issue similar to the one I had a number of months ago - apologies if it's not a fix or I misread your current problem.

In your extension, make sure you point your reference at the Newtonsoft version inside the Outsystems instalation folder, eg C:\Program Files\OutSystems\Development Environment 11.0\Integration Studio (references -> add reference -> browse).

Outsystems comes packaged with this verson of Newtonsoft, and I can only assume there's something hardcoded in the depths of it that expects this specific file / version. I don't really understand what's going on, especially since sometimes nuget versions seem to work fine... until they don't. 

MichaelR wrote:

I think this might be an issue similar to the one I had a number of months ago - apologies if it's not a fix or I misread your current problem.

In your extension, make sure you point your reference at the Newtonsoft version inside the Outsystems instalation folder, eg C:\Program Files\OutSystems\Development Environment 11.0\Integration Studio (references -> add reference -> browse).

Outsystems comes packaged with this verson of Newtonsoft, and I can only assume there's something hardcoded in the depths of it that expects this specific file / version. I don't really understand what's going on, but when we had our issue it sorted it for us. Of course, being Integration Studio, this isn't documented anywhere, so we had a dozen extensions using Newtonsoft from nuget for months without issue... until we did a platform upgrade and everything broke.

I don't believe we are talking about the same problem. The issue was that I was using a third party library that uses a later version of Newtsonsoft.Json. Outsystems doesn't allow using versions that are newer than the hardcoded version it uses. Speaking with support back in August I confirmed with them that there is no fix for this except using the version they use. I couldn't do that because I didn't have the option of modifying the third party library I was using and it calls functions that don't exist in the Newtsonsoft version that Outsystems uses.

My own solution to this was to just give up on the extension and find another way to do what I needed from within a regular web module.

Trevor wrote:

I don't believe we are talking about the same problem. The issue was that I was using a third party library that uses a later version of Newtsonsoft.Json. Outsystems doesn't allow using versions that are newer than the hardcoded version it uses. Speaking with support back in August I confirmed with them that there is no fix for this except using the version they use. I couldn't do that because I didn't have the option of modifying the third party library I was using and it calls functions that don't exist in the Newtsonsoft version that Outsystems uses.

My own solution to this was to just give up on the extension and find another way to do what I needed from within a regular web module.

Oops, I obviously didn't read the whole thread well enough. It seems like it's essentially the same issue but just not as easily solved since it's a third party library.

You have "DLL Hell". This is a well-known problem, and it is especially common with this particular DLL.

https://success.outsystems.com/Support/Enterprise_Customers/Troubleshooting/Why_are_changes_in_a_producer_not_reflected_in_the_consumers%3F_(aka_Library_Hell)

J.Ja

When editing the extension in Visual Studio, try including the Newtonsoft.Json.dll reference from the Integration Studio folder (eg.: C:\Program Files\OutSystems\Development Environment 11\Integration Studio) 

Worked for me.