Skip to main content
Answer

Is It possible to use Nuget packages in Acumatica?

  • February 9, 2023
  • 15 replies
  • 236 views

Forum|alt.badge.img+1

Is there any possibility to add Nuget packages to Acumatica Customization project?

Best answer by Dmitrii Naumov

@charithalakshan49 it seems this nuget package has other dependencies. You need to add all dependencies to the customization package

15 replies

asommer
Varsity I
Forum|alt.badge.img
  • Varsity I
  • February 9, 2023

Yes, you can add them using normal Visual Studio and incorporate them into the dll for your project.  Is there a specific package you’re looking at?


Forum|alt.badge.img+1

No, I am going to use it in a new package. Could you please tell me how can I incorporate those into .dll and add it to my project.?


asommer
Varsity I
Forum|alt.badge.img
  • Varsity I
  • February 9, 2023

There’s some steps involved and this course goes through the process: https://openuni.acumatica.com/courses/development/t190-development-quick-start-in-customization/.

 

 


Forum|alt.badge.img+1

@asommer I followed that one and there was a validating error related to Nuget package when I’m trying to publish the project.Is there any special way to add Nuget package into the .dll file?

 

Error is :

CustomizationV1.dll Failed to resolve assembly

asommer
Varsity I
Forum|alt.badge.img
  • Varsity I
  • February 9, 2023

Interesting, what Nuget package are you trying to include?


Forum|alt.badge.img+1

@asommer Its EPPlus Nuget Package.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • February 10, 2023

@charithalakshan49  Not sure about the error, you are getting.

But I just tried and able to install it in my local Acumatica instance through the VS.

 

 


Forum|alt.badge.img+1

@Naveen Boga Yes, I also was able to add the Nuget package without getting any error. But the error occured when I add some codes in graph using that Nuget package.

 

As an example can you please try adding this code snippet to a graph.

using OfficeOpenXml;

ExcelWorksheet sheet = package.Workbook.Worksheets.Add("MySheet");

 

This leads me to above error when publishing.


andriikravetskyi35
Jr Varsity I
Forum|alt.badge.img+1

Hi, everyone

You can create ignore file (with saved errors) and add it to customization package.

This approach will skip errors and publish customization, but I am not sure that site start working, depends from *.dll from nuget package. I had (successful && !successful) situations.

https://help.acumatica.com/Wiki/(W(27))/ShowWiki.aspx?pageid=282cc58a-4700-4e9d-8cf6-4641e625c0d6

https://stackoverflow.com/questions/48679096/acumatica-unable-to-publish-the-customization-package


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • February 10, 2023

@charithalakshan49 when you add a nuget package dependency to your project, usually you’ll get a separate dll corresponding to this nuget package in your bin folder. That dll should be also included in the customization package. Please make sure it’s there.


Forum|alt.badge.img+1

@Dmitrii Naumov I had a look about that. Yes, the .dll related to Nuget package is there in Bin folder. But in customization project editor, I can not see it when I click Add files. So, how do I add it to my project?

 

 


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • February 10, 2023

@charithalakshan49 you can put that dll in the bin folder of your local site and then you’ll have it in this list


Forum|alt.badge.img+1

@Dmitrii Naumov I added it to the package as you said. But again it shows the following validation errors.

 


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • February 10, 2023

@charithalakshan49 it seems this nuget package has other dependencies. You need to add all dependencies to the customization package


Forum|alt.badge.img+1

@Dmitrii Naumov Adding all the dependencies(I identified those according to validation errors) to customization package solved the validation errors. Thanks a lot.!

 

@andriikravetskyi35 @asommer @Naveen Boga Thanks for the responses.!