Error in compiling Assembly Package

Hi,

 

I was trying to create Assemble Package and created one c# file which has dependencies on NewtonsoftJSON dll. When I tried to publish it says it required dll (attached reference). If we import the DLL into the current package it is working as expected but as per my understanding, we need to add the Assembly package dependencies on [Package name].csproj file.

 

I could see below code already presents there,



        

            False

        

        

            False

        

    

 

which means should we need to create any folder with Assemblies or we manually need to import all the package dependencies through import?

 

Thanks,

Altaf Hussian M

 

Like 0

Like

1 comments

Hi Altaf Hussian,



If it’s a regular package you can use the Newtonsoft.Json core library, but for the assembly package, the required DLL must be added to the package explicitly.



The Assembly package is like an external cs project.

If you want to use an external library like Newtonsoft.Json.dll in your project - you have to specify it as a reference for your project (using) by adding that dll to the package.



The same can be achieved by using the Terrasoft core class without adding any explicit dll reference into the package as below,

Example of the code:

using CommonJson = Terrasoft.Common.Json;
string orderItemsInput = CommonJson.Json.Serialize("YourObject");
string orderItemsInput = Terrasoft.Common.Json.Json.Serialize("yourObject");



Terrasoft.Common.Json

Serialize Polymorphism

 

 

BR,

Bhoobalan Palanivelu.

Show all comments