Jeremy Hofmann
Crowe Chizek and Company LLC
June 15th 2007
http://www.crowecrm.com
Summary: Jeremy Hofmann shows how to speed up deployment your callouts during the development process.
Microsoft CRM 3.0 supports an easy deployment model for developing your own business logic extensions, commonly known as "callouts". You simply develop your .NET code, copy your assembly (.dll) to the web server, and add the appropriate entries to a configuration file.
During development, you often need to run through this develop deployment cycle several times in rapid succession. To make life easier, you may find it useful to use Visual Studio post-build events. Post-Build events in Visual Studio allow you to run a command line set of instructions upon a successful build of your Visual Studio Project. You can use the post-build event to xcopy your custom assembly and configuration file to your test CRM server. If you do your development directly on the server, you can also issue an iisreset command which is needed to recognize the changes. This will save you from manually having to copy the .dll and config file out each time you rebuild.
In Visual Studio, right-click on your project, go to Properties, then select the Build Events side tab. In the Post-build event box, copy the following command lines:
iisreset
xcopy "$(TargetDir)*.dll" "C:\Program Files\Microsoft CRM Server\Server\bin\assembly" /y
xcopy "$(ProjectDir)*.xml" "C:\Program Files\Microsoft CRM Server\Server\bin\assembly" /y
This assumes you are developing on the server, and that the callout config file is part of your Visual Studio project. You can change the names and paths to suit your needs. Hopefully this will free your mind a little when developing and testing your callouts in rapid succession.
Jeremy Hofmann is a Manager and CRM specialist at Crowe Chizek.