Solved

Adding Project to Custom Project Editor

  • 19 January 2022
  • 16 replies
  • 84 views

Userlevel 3
Badge
  • Jr Varsity III
  • 133 replies

Hi,

I have developed a project which integrated in such way 

  1.  
  2. Selected my Custom Project 

     

  3. Pressed Binding to existing

  4. Provided way to my project that is located in Project folder in App_Data Where Acuamatica instance is located                                                                                                                 C:\Program Files\Acumatica ERP\AcumaticaDB_new\App_Data\Projects\MySolution

After  that my visual studio solution was successfully attached to Acumatica and I created application.

Now I need make the same thing with ready libraries of my project, so I have putted project libraries to same folder for client’s instance 

But I receive such error 

How to Bind My Solution to Acumatica with built project ?

icon

Best answer by markusray17 20 January 2022, 18:40

View original

16 replies

Userlevel 5
Badge +1

I’m not really sure why you need that. Could you clarify?

 

In general, you do not bind your customization project to already built dlls. You can only bind it to a Visual Studio solution.

 

Userlevel 6
Badge +3

If I am understanding the problem correctly, you have compiled the project and now need to create the distributable customization?

You would just need to add the compiled .dll files to the Files section in the customization project. Binding to and Extension Library is for development. Once you have the files in the customization project you can export it and then import it on a new system. When published it puts the .dll files into that system’s bin folder which causes them to be loaded when the system restarts.

Userlevel 3
Badge

I’m not really sure why you need that. Could you clarify?

 

In general, you do not bind your customization project with already built dlls. You can only bind it with a Visual Studio solution.

 

Hi, dnaumov

I am trying to bind my prject with Acumatica via built dlls, the binding of project with Open Code on client side seems not be secured, I thought there is an opportunity to bind project by dlls

As you have mentioned that “You can only bind it with a Visual Studio solution.” - there is only one way to deploy my project for client - do same that I did for binding project with Acumatica during development by proving path to visual studio solution ?

Userlevel 3
Badge

If I am understanding the problem correctly, you have compiled the project and now need to create the distributable customization?

You would just need to add the compiled .dll files to the Files section in the customization project. Binding to and Extension Library is for development. Once you have the files in the customization project you can export it and then import it on a new system. When published it puts the .dll files into that system’s bin folder which causes them to be loaded when the system restarts.

you understood me correctly. 

All I need to do is :

1) add these files for my Customization Project at my Acumatica

2)Export Customization Project

3)import it for client’s Acumatica

Am I right ?

Userlevel 5
Badge +1

@Ivan  as @markusray17  mentioned above, you don’t need to bind the project to an extension library to distribute it to the client. 

You only need to include the dlls in the customization package when you build it locally and then you can distribute the customization package without a need to do anything else on client side.

see related help article here:

https://help-2021r2.acumatica.com/(W(127))/Help?ScreenId=ShowWiki&pageid=01a694bb-8e42-436c-89ad-2c42c040089a

Userlevel 6
Badge +3

Yes and then when you publish it on the client’s system it will place those dll files into their system’s bin folder.

Userlevel 3
Badge

Yes and then when you publish it on the client’s system it will place those dll files into their system’s bin folder.

I have added my project to files 

 but in client’s Acumatica I receive the errors

However, on my side the project is perfectly working

In my project folder there are 3 dlls 

I thought I should add them, but in Project Editor there is only one my dll , the rest of the files have extension .pdb

Should I add all files that are present here ?

Userlevel 3
Badge

@Ivan  as @markusray17  mentioned above, you don’t need to bind the project to an extension library to distribute it to the client. 

You only need to include the dlls in the customization package when you build it locally and then you can distribute the customization package without a need to do anything else on client side.

see related help article here:

https://help-2021r2.acumatica.com/(W(127))/Help?ScreenId=ShowWiki&pageid=01a694bb-8e42-436c-89ad-2c42c040089a

I have added my project to files 

 but in client’s Acumatica I receive the errors

However, on my side the project is perfectly working

In my project folder there are 3 dlls 

I thought I should add them, but in Project Editor there is only one my dll , the rest of the files have extension .pdb

Should I add all files that are present here ?

Userlevel 5
Badge +1

@Ivan  are you sure that you have the same version of Acumatica locally and in the client’s instance? 

You don’t need PX*dlls in your customization package, those are part of the system itself.

Userlevel 3
Badge

@Ivan  are you sure that you have the same version of Acumatica locally and in the client’s instance? 

You don’t need PX*dlls in your customization package, those are part of the system itself.

No, the version are different. Our 2021R2 and client’s 2020R1

Userlevel 5
Badge +1

That’s probably what is causing the issues you see. You can only be sure that customizations developed on the same major version are compatible with the instance. 

Userlevel 6
Badge +3

The errors you are getting are saying that method signatures are different and some methods aren’t found on the system you are trying to publish to. 

It does tell you the specific methods/classes. For example ICurrentUserInformationProvider probably doesn’t exist on 2020R1 but you can also use PXAccess.GetUserID() to get the current user id and probably exists on 2020R1. 

I’d recommend you install a local version of 2020R1 and then bind that instance to the solution, the IDE should highlight all the things that are missing or have the wrong signature and you can just go through and fix them/find alternatives.

Userlevel 3
Badge

That’s probably what is causing the issues you see. You can only be sure that customizations developed on the same major version are compatible with the instance. 

 

Hi, dnaumov

There is one moment that I need to clarify

Before I started to develop this project with 2021R2 version, I was doing same for 2020R2

I tied to import custom project for  2020R2 and received such errors

The first error is 

Method signature was changed: System.Nullable`1<System.Int32> PX.Objects.AR.ARAdjust::get_DisplayCustomerID() declared in PX.Objects, Version=1.0.0.0,

i understood where the problematic area and tried to write same code for 2020R2 Acumatica as I wrote for 2021R2

And the environment shows that such element exists for Adjust entity also for 2020R2 version

The second error is  

Method signature was changed: System.Void PX.Objects.Common.Extensions.PXCacheExtensions::VerifyFieldAndRaiseException

I also found it in code in solution for 2021R2 

And this is exactly the same that was written for 2020R2 in Solution 

In both cases method signatures are not different, if these parts of code are written in visual studio solution that is bound with Acumatica 2020R2 it is working, but if I am trying to achieve same result by importing package I receive the errors 

Userlevel 3
Badge

The errors you are getting are saying that method signatures are different and some methods aren’t found on the system you are trying to publish to. 

It does tell you the specific methods/classes. For example ICurrentUserInformationProvider probably doesn’t exist on 2020R1 but you can also use PXAccess.GetUserID() to get the current user id and probably exists on 2020R1. 

I’d recommend you install a local version of 2020R1 and then bind that instance to the solution, the IDE should highlight all the things that are missing or have the wrong signature and you can just go through and fix them/find alternatives.

Hi, markusray17

There is one moment that I need to clarify

Before I started to develop this project with 2021R2 version, I was doing same for 2020R2

I tied to import custom project for  2020R2 and received such errors

The first error is 

Method signature was changed: System.Nullable`1<System.Int32> PX.Objects.AR.ARAdjust::get_DisplayCustomerID() declared in PX.Objects, Version=1.0.0.0,

i understood where the problematic area and tried to write same code for 2020R2 Acumatica as I wrote for 2021R2

And the environment shows that such element exists for Adjust entity also for 2020R2 version

The second error is  

Method signature was changed: System.Void PX.Objects.Common.Extensions.PXCacheExtensions::VerifyFieldAndRaiseException

I also found it in code in solution for 2021R2 

And this is exactly the same that was written for 2020R2 in Solution 

In both cases method signatures are not different, if these parts of code are written in visual studio solution that is bound with Acumatica 2020R2 it is working, but if I am trying to achieve same result by importing package I receive the errors 

Userlevel 6
Badge +3

I would double check your references and make sure they are pointing to the correct 2020R1 .dlls. You also want to make sure to be on 2020R1 not 2020R2 if that is what your client is using.

Userlevel 3
Badge

I would double check your references and make sure they are pointing to the correct 2020R1 .dlls. You also want to make sure to be on 2020R1 not 2020R2 if that is what your client is using.

Thanks a lot for your assistance  

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 — 2020  Acumatica, Inc. All rights reserved