Xrm Tools v1.0.5 Released - Smarter Plugin Registration with Refactoring Actions

I’m excited to announce the release of Xrm Tools v1.0.5, a powerful Visual Studio extension designed to accelerate plugin development for the Power Platform. This release introduces a new productivity feature: refactoring actions that automatically complete plugin registration attributes and boiler plate code—saving you time, reducing errors, and making your workflow much smoother.
One feature that previous versions brought to us was registration attributes. By writing attributes like [Plugin], [CustomApi] you will get code generation and one-click registration. You can even write and POCO classes for Request and Response that behind the scenes create input / output parameters and more code generation. In other words you can instantly build a Custom API and register it in your development environment by just writing code like this:
[Plugin(Description = Description)]
[CustomApi("prefix_Greet", DisplayName = "Greeting API", BindingType = BindingTypes.Global, StepType = ProcessingStepTypes.None, Description = Description)]
public partial class GreetPlugin
{
public const string Description = "Greets a newcomer";
[CustomApiRequest]
public class GreetingRequest
{
public string? FirstName { get; set; }
public string? LastName { get; set; }
}
[CustomApiResponse]
public class GreetingResponse
{
public required string Greeting { get; set; }
}
public void Execute(IServiceProvider serviceProvider)
{
var context = (IPluginExecutionContext)serviceProvider
.GetService(typeof(IPluginExecutionContext));
var request = GetRequest(context.PluginExecutionContext);
SetResponse(context.PluginExecutionContext, new GreetingResponse
{
Greeting = $"Welcome {request.FirstName} {request.LastName}!"
});
}
}
You can register the above Custom API with just one click to your development environment.
BUT, What if you already have a Custom API or a simple plugin from the pre Xrm Tools eras? 🦖
✨ New in v1.0.5
The focus in this release is to make it easy for developers to enable Xrm Tools for their old plugins with Xrm Tools.
New Refactoring Actions
Starting with version 1.0.5, if you just add a [CustomApi("your-api-name")]
and click on the light bulb (or press Ctrl+.) you will get quick refactoring actions that can generate all the required registration attributes from your custom API plus all the request parameters and response properties.

This will eliminate manual guesswork and reduce registration mistakes for your old Custom APIs.
Stay tuned! The same feature is coming to entity based plugins too.
New registration attributes [RequestParameter] and [ResponseProperty]
You now have two ways of making a request parameter optional. Like before if you add null annotation to a property type, it becomes an optional parameter.
[CustomApiRequest]
public class GreetingRequest
{
public string FirstName { get; set; }
public string? LastName { get; set; } // LastName will be optional
}
This only works for reference type if you are using C# 8.0+, but now if your project is in older C# languages and you want to keep it that way (🤔), you can add [RequestParameter(IsOptional = true)]
to make it optional. There are other properties there, but I let you discover them. There is also [ResponseProperty]
attribute there too.
Other enhancements
- Register plugin(s) command has a new icon now.
- Minor enhancements and fixes to make you happier.
📥 Get It Now
You can install or update Xrm Tools from the Visual Studio Marketplace. If you’re already using it, just check for updates via Visual Studio or enable the new auto-update to not miss any new features and enhancements in future.
💬 Got feedback or feature requests?
Feel free to open an issue on GitHub or reach out on LinkedIn or X. Your input helps shape the roadmap!