Question

I'm following the tutorial for http://mscrmshop.blogspot.be/2012/03/how-to-use-crmsvcutil-improved-version.html on autogenerating an XrmServiceContext file for Dynamics CRM 2011 development.

I have a solution with 3 projects. Each project has a slightly different namespace, depending on whether it's for Plugins, Workflows or the web portal. They all share the format company.software.productversion.module, and only module is different. I want to generate 1 file for each project and put them in the appropriate folders, but I only want to build this project once every time I change my CRM configuration, after which it builds 3 context files (1 for each namespace) and places it into the correct folders.

Is there a way to configure the config file for this project so this happens automatically?

Was it helpful?

Solution

There are multiple ways to do this. Probably the simplest is to have three different folders, each containing their own CrmSvcUtil and their own config file. Then in your Post Build Command line (or if you want to run it manually create a batch file), enter the paths to your 3 different CrmSvcUtil's:

"$(TargetDir)\Project1\CrmSvcUtil.exe" 
"$(TargetDir)\Project2\CrmSvcUtil.exe" 
"$(TargetDir)\Project3\CrmSvcUtil.exe" 

Each one will run by itself with it's own settings, and can output it's own context file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top