I'm using dynamics-crm 2016, I have a postupdate plugin of Phonecall entity.
After state
is completed
I do some actions. The problem is that when I run it in debug and using breakpoint & etc' everything works fine but out of debug nothing is. At first my code was in setState - plugin and nothing worked so I thought that was the prob then I used the Update message and still only works on debug... how to solve this issue and how does it happen ?
Asked
Active
Viewed 779 times
2

Damkulul
- 1,406
- 2
- 25
- 59
-
OK I digged in and found this prob :Plug-in assembly does not contain the required types or assembly content cannot be updated. how can I solve that? – Damkulul Mar 05 '18 at 13:11
-
Are you facing this above commented issue in PRT while registering? you may need to update the question or a new one.. – Arun Vinoth-Precog Tech - MVP Mar 05 '18 at 16:41
-
Do you have any external references?? – Nicknow Mar 05 '18 at 23:47
-
@Nicknow I don't have a new referenced assemblies... so that's not the case, but when I tried to update with an older DLL it did update, so how can I find the specific place of the mis match? – Damkulul Mar 06 '18 at 09:39
2 Answers
0
As your issue is a problem with the referenced assemblies, you will need to merge the main assembly with the referenced assemblies.
In the post build events you can use ILMerge to merge the main assembly and the dependencies into one single assembly.
You can find ILMerge here: https://www.microsoft.com/en-au/download/details.aspx?id=17630, or even better you can follow the answer here: How to Integrate ILMerge into Visual Studio Build Process to Merge Assemblies?.

Hadley Pettigrew
- 51
- 6
-
I don't have a new referenced assemblies... so that's not the case, but when I tried to update with an older DLL it did update, so how can I find the specific place of the mis match? – Damkulul Mar 06 '18 at 09:38
-
Do you update the assembly version before each upload of the dll to CRM? – Hadley Pettigrew Mar 06 '18 at 20:57
-
I've found that ILRepack works faster and results in slightly smaller dlls, with the same exact syntax as ILMerge: https://github.com/gluck/il-repack – Daryl Mar 07 '18 at 19:19
0
You should check the .Net framework against which the solution is being built against. In the past I can only build the extension up to the 4.5.2 framework.

Stefan William-Worrall
- 693
- 8
- 21