Показать сообщение отдельно
Старый 25.12.2008, 15:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
mscrm4ever: Expediting Plug-In Development Using VS Pre/Post Build Events
Источник: http://mscrm4ever.blogspot.com/2008/...-using-vs.html
==============



No doubt, CRM 4.0s new plug-in engine is a giant leap compared to the callout facility that was available on the 3.0 version.
However, a few things still hinder the development process. One of which is the fact that you need to reset the Internet information services (IIS) and copy your project files to the assembly bin folder each time you compile your code.

In order to overcome and automate the process you can add Pre and/or Post Build events to you plug-in project.
Build event are no more then command line instructions you need to run before and/or after you project builds.

The nice thing about Post events is that you can set them to run only if the build is successful. Which means the iisreset won’t run and the files won’t be copied unless the build is complete. Following are the Post build command instruction I add to every plug-in project we build.



1.Open the Build Events Property Page: The Build events are located on the Project Properties page under the build events Tab.
2.Add the following commands to the Post Build Event (make sure you run the command only on successful build)
Resets Internet information Services

call iisreset

Copy the *.dll file to the assembly bin folder.

xcopy "$(TargetPath)" "C:\[CRM INSTALL FOLDER]\Server\bin\assembly" /i /d /y

Copy the *.pdb file to the assembly bin folder

xcopy "$(TargetDir)$(TargetName).pdb" "C:\[CRM INSTALL FOLDER]\Server\bin\assembly" /i /d /y


That’s it.

Источник: http://mscrm4ever.blogspot.com/2008/...-using-vs.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.