Hello,
I have a reference a DLL in the AOT and use this in my class. Whenever I compile the said class, it works file but when I generate Incremental CIL Generation, it throws the following error:
CIL generation: Error: .NET Cast Type Name not found. Type System.String found on the stack. This code in Class/Table: [Class Name], Method: run may not work in CIL run time.
Any idea?
Thanks,
Lyka Tasis
*This post is locked for comments
Hi All,
Anybody resolved this issue. Even I've tried all the solutions but, didn't work for me.
Any help!!!
Hi all,
Although this is an old thread, I wanted to revive it since I have pretty much the same issue and I have already tried the remedies suggested by all contributors.
Every now and then when we attempt incremental CIL build we get hailed by similar errors from standard AX code:
CIL generation: Error: .NET Cast Type Name not found. Type System.String found on the stack. This code in Class/Table: PCRuntimeConfigurator, Method: calculationSummaryEventHandler may not work in CIL run time. \Classes\PCRuntimeConfigurator\calculationSummaryEventHandler 1 calculationSummaryEventHandler Err:351
This continues to happen even after ensuring we compile using the client installed on the computer hosting the AOS and despite that the assembly Microsoft.Dynamics.AX.Xpp.Support.dll was copied from C:\Program Files\Microsoft Dynamics AX\60\Server\[AOS instance]\bin\ to C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\.
Any ideas what else might be missing?
Thanks AlexDAX, that did the trick.
The problem is because something in your code needs Microsoft.Dynamics.AX.Xpp.Support.dll, which is in the C:\Program Files\Microsoft Dynamics AX\60\Server\[AOS]\bin folder and not in the client folder.
You can just change your class property RunOn to "Server" instead of "Called From" and the CIL should compile fine. The switch back to "Called From"...and even further incremental CIL builds will work...just do the switch for the one time.
Or you can copy the DLL to the client bin folder.
Hi,
I had the same problem, and was caused by the CPU targeting in the VS project; I changed this to Any CPU, and checked that references were correctly targetted.
Regards
sorry, but why dll this way?
always force to use the dll server side.
also compile always with a client on the server
in that case you don't have to bother about deploying the dll to all clients.
or is it a visual studio project?
Hi,
As i stated in my previous answer, the .dlls were missing in the client\bin - Folder of the client installation (which in most cases should be something like "C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin") and in the server\common - Folder of the Server-installation (should be something like "C:\Program Files\DynamicsAX2012\Server\Common" on the AOS-Computer).
André
Hi! Can you still remember which locations should the .dll file be copied?
Thanks.
HI Lyka,
I encountered the same problem today. I had made some changes concerning a managed control that we use in our application and could not build CIL-Code encountering the same error message. I can again by now. Here is what I did:
After comparing my system to a 'healthy' System, I found out that I was missing the Microsoft.Dynamics.AX.Xpp.Support.dll in several points. Apparently, this dll is responsible for type conversions at runtime ( msdn.microsoft.com/.../aa595142.aspx). This dll was present in the healthy system in the client\bin-folder and in the server\common-folder of the Dynamics installation. It was not present in my Installation.
After Copying the dll to those locations some restarting of the service, it worked again.
Don´t ask me, why the dll was missing, because I have no clue.
Hope this helps (even if your question was a while ago).
André
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,316 Most Valuable Professional
nmaenpaa 101,156