Create a temporary plugin assembly
Introduction
On a project, it’s common for multiple developers to be updating the same Dataverse plugin assembly at the same time. This post describes one way for a developer to make updates to the plug-in without affecting other developers
Scenario
Consider the situation where a developer (Dustin) has updated the plugin assembly Contoso.Common.Plugins.dll (Figure 1) on the development server. Dustin then starts testing the code updates and hasn’t yet checked those code updates into the code repository.
Now consider that another developer (Leon) wants to update the same plugin assembly with their code updates. Since Dustin’s code hasn’t been checked into the repository, when Leon’ updates the assembly (using the Plugin Registration Tool), Dustin’s code will be removed.
To get around this issue, Dustin could create a temporary plugin assembly e.g. Contoso.Common.Plugins.Dustin.dll in order to test his code. That way, Dustin won’t be impacted by other developers.
In the example below, a custom api called DocumentApi exists in the plugin assembly Contoso.Common.Plugins. This will also be added to the temporary assembly Contoso.Common.Plugins.Dustin. That way, the developer can make updates to the custom api and not be impacted by other developers who are also making updates to the assembly
Note, this is an alternative method to test plugins https://dustinminer.com/2023/03/16/creating-a-plugin-and-unit-testing-it-with-fakexrmeasy/
Steps
![](https://dustinminer.com/wp-content/uploads/2024/03/1.png)
1.) Copy the folder Contoso.Common.Plugins and rename it to Contoso.Common.Plugins.Dustin (Figure 2)
![](https://dustinminer.com/wp-content/uploads/2024/03/2-1.png)
2.) Add the temporary plugin project to the solution (Figure 3)
![](https://dustinminer.com/wp-content/uploads/2024/03/3.png)
3.) Add a suffix to the temporary plugin project name (Figure 4 & 5)
![](https://dustinminer.com/wp-content/uploads/2024/03/4.png)
![](https://dustinminer.com/wp-content/uploads/2024/03/5.png)
4.) Register the plugin (Contoso.Common.Plugins.Dustin.dll) using the Plugin Registration Tool (Figure 1)
5.) Update the ‘Plugin Type’ to point to the temporary plugin assembly (Figures 6 & 7)
![](https://dustinminer.com/wp-content/uploads/2024/03/6.png)
![](https://dustinminer.com/wp-content/uploads/2024/03/7.png)
6.) Test the custom api running in the temporary plugin assembly (Figure 8)
![](https://dustinminer.com/wp-content/uploads/2024/05/8-1.png)
Further reading
https://www.xrmtoolbox.com/plugins/Rappen.XrmToolBox.CustomAPITester/