web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Generating early bound classes for actions fails to produce code?

(0) ShareShare
ReportReport
Posted on by 11

Hi,

We're using early bound code generation to generate classes for some of our plugins. However, since recently, it appears as though no code is generated for actions any more.

I have tried using XrmToolbox "EarlyBoundGenerator" tool, but also directly using different versions of the crmsvcutil.exe tool, and I have also tried the new pac modelbuilder tool. All of them do process the messages in the environment, but in the end I just end up with an empty code file containing only the namespace I specified. Did anyone else run into this?

It doesn't seem to matter what environment I use, the result is always the same; I have access to different test environments running both managed and unmanaged solutions of the actions I'm trying to generate code for.

Example output (CrmSvcUtil)

CrmSvcUtil : CRM Service Utility [Version 9.1.0.95]
c 2020 Microsoft Corporation. All rights reserved

Begin Reading Metadata
Completed Reading Metadata 00:01:05.2734297
Begin Writing File
Ensuring Context File is Accessible
Writing file Actions.cs to <redacted>\AppData\Local\Temp\tmpCA02.tmp
Processing 384 OptionSets
Wrote 0 OptionSets
Processing 1382 Entities
Wrote 0 Entities
Processing 135 Messages
Wrote 119 Messages
Code written to <redacted>\AppData\Local\Temp\tmpCA02.tmp.
Updating File <redacted>\Plugins\CI365.Base\Entities\Actions.cs
Cleaning up Temporary File <redacted>\AppData\Local\Temp\tmpCA02.tmp
<redacted>\AppData\Local\Temp\tmpCA02.tmp Moved To: <redacted>\Plugins\CI365.Base\Entities\Actions.cs
Completed Writing File 00:00:00.0547362
Creation Complete!

It's suspect that it says it wrote 119 messages? I don't see any of that. (Besides in our default actions filter we specify only 5 action's we're interested in)

Example output (pac modelbuilder, note that I did not put any filters on the messages in this case, and it only wrote 1 message, and I don't recognize it "msdyn_CreateTrainEffortModelConfig"):

C:\Temp\pactest3>pac modelbuilder build ^
More? -enf account;<snipped for brevity>;webresource;workflow ^
More? -a ^
More? -n CI365.Base.Entities ^
More? -o .
Connected to... <redacted>
Connected as <redacted>
Begin Reading Metadata from MetadataProviderService
Begin Reading Metadata from Server
Read 58 Entities
Read 0 Global OptionSets
Read 135 SDK Messages
Completed Reading Metadata from Server - 00:00:32.9140108
Completed Reading Metadata from MetadataProviderService - 00:00:32.9166505
Begin Writing Code File
Processing 58 Entities
Wrote 58 Entities - 00:00:01.2133810
Processing 135 Messages
Wrote 1 Messages - 00:00:00.0120162
Processing 42 Global OptionSets
Wrote 42 Global OptionSets - 00:00:00.0044162
Code written to C:\Temp\pactest3\Entities\account.cs.
Code written to C:\Temp\pactest3\Entities\activityfileattachment.cs.
<snipped>
Code written to C:\Temp\pactest3\Entities\workflow.cs.
Code written to C:\Temp\pactest3\Messages\msdyn_CreateTrainEffortModelConfig.cs.
Code written to C:\Temp\pactest3\OptionSets\msdyn_travelchargetype.cs.
<snipped>
Code written to C:\Temp\pactest3\OptionSets\workflow_stage.cs.
Code written to C:\Temp\pactest3\OptionSets\workflow_runas.cs.
Code written to C:\Temp\pactest3\EntityOptionSetEnum.cs.
Completed Writing Code File - 00:00:01.4945558

I'm a bit at a loss here, so any ideas are welcome.

I have the same question (0)
  • MrNappa Profile Picture
    11 on at
    RE: Generating early bound classes for actions fails to produce code?

    In the end, I tried a full reset of my dev environment and reimported all our custom solutions. This seemed to repair whatever was broken and code generation started behaving normally again after that (at least in that instance, all other environments still have buggy codegen).

    Unfortunately, I have not been able to identify the cause of the issue, and I hope the problem will not return in the future.

    If a reset is not possible or does not fix things for you, you could try opening a support ticket with Microsoft, but my experience with their support on deep technical issues like this is not very positive (that's why I was glad I could "resolve" this with a reset).

  • Kregel Profile Picture
    5 on at
    RE: Generating early bound classes for actions fails to produce code?

    Did you ever get a resolution to this issue? We are having the exact same issue. It worked fine for years and then broke sometime in Spring of 2023.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
DAnny3211 Profile Picture

DAnny3211 126

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 117

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 70 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans