By developing of the custom Device Service Provider Interface, you will be required many times to re-install the the provider.
For example, you deploy one version and find some bug, which has to be fixed. After fixing of the bug, the new version has to be deployed. This
process is usually recurring for a while, until you get the final stable version. The problem at this place is that deployment (re-registering) of DSPI component
takes too many steps (clicks). Each time you have to register new provider, set some properties and attach to the process. This is just too slow and it does not make a fun.
The good thing is that there is a "fast" way to deploy the provider without of using of RFID-MMC at all. Usually, after registration of the provider, the RFID-management console
silently copies the provider's assembly from registering folder to following folder:
%programfiles%\BizTalk RFID\Providers\daenet filewatcher
In this example "file watcher" is the name of the custom provider which is registered. By each new version of the provider's assembly you should copy the assembly to that folder.
That means, if you deploy the new version just be sure that assembly is copied to the same location. This is exactly the assembly which will be loaded in the application domain.
Because the RFID infrastructure is hosted in the service BizTalkRfid the service has to be stopped before the assembly is copied. After copying of the assembly RFID service has to be
started. After all, attach to the process RfidServices.exe. This process hosts the BizTalkRfid service and your provider.
To perform all steps automatically following should be done:
- Create the batch file with the name DeployProvider.bat
Paste following code in the new file:
net stop biztalkrfid
"c:\program files\Biztalk rfid\Providers\daenet filewatcher"\Daenet.Rfid.FileProvider.dll
net start biztalkrfid
- Open Visual Studio, go to menu Tools|External Tools and add new command. As a executable of the command enter the name of the previously created file: DeployProvider.bat.
One could ask why I have chosen to create the external tool instead of registering of Post-Build Event. The reason is of practical nature. Because starting and stopping of the process is relative slow operation it should not be started after each build. Finally, you do not want to deploy the assembly each time you perform a build.
Jun 09 2007, 01:16 AM