Solved

Is It possible to use Nuget packages in Acumatica?


Userlevel 4
Badge +1

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

icon

Best answer by Dmitrii Naumov 10 February 2023, 19:22

View original

15 replies

Userlevel 2
Badge

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?

Userlevel 4
Badge +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.?

Userlevel 2
Badge

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

 

 

Userlevel 4
Badge +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
Userlevel 2
Badge

Interesting, what Nuget package are you trying to include?

Userlevel 4
Badge +1

@asommer Its EPPlus Nuget Package.

Userlevel 7
Badge +17

@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.

 

 

Userlevel 4
Badge +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.

Userlevel 5
Badge +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

Userlevel 7
Badge +5

@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.

Userlevel 4
Badge +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?

 

 

Userlevel 7
Badge +5

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

Userlevel 4
Badge +1

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

 

Userlevel 7
Badge +5

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

Userlevel 4
Badge +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.!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved