Tuesday, May 30, 2017

CRM Developer Extensions - Where's VS 2017 Support?

In the process of a rewrite for Visual Studio 2017.

Why a rewrite? There were some changes to be made to make the original extension work in VS 2017, it wasn't going to be a major effort but I thought this would probably be a good time to re-evaluate what was done so far and make some improvements. When I started out originally I really didn't have any plan, I just started coding. It didn't help either that I had no previous experience developing extensions for Visual Studio so I was learning as I went. Ultimately though in the end, it was a mess and it was amazing anyone at all contributed (big thanks to those that did).

As a quick refresher for those that maybe aren’t familiar with this project. In the 2011/2013 days Microsoft shipped the Developer Toolkit for Visual Studio with the SDK which had templates, deployment tools, etc. to make a CRM developer’s life easier. When 2015 rolled around it took a hiatus. Preferring not to not waste time on the tedious tasks I built my own set of extensions (VS Marketplace / GitHub) with templates, deployment tools, and other things. It seemed to fill the gap and may people got value out of using it – nearly 26k downloads thus far. Now we’ve come full circle and with Dynamics 365, Microsoft has released a new version. It’s got some cool features but ultimately isn’t getting the love it needs. Microsoft probably needs to hire someone that’s beyond outgoing and is an authority on Azure to work on it – there’s a not funny joke in there BTW :)
So what's the plan this time around? Here's what I had in mind so far.

  • Visual Studio 2017 compatibility – still thinking about supporting back to 2012 as the new VSIX v3 is supposed to support that
  • Still avoiding proprietary project types – this is one of the things I dislike most about the Microsoft offering, some of the projects won’t open unless the Developer Toolkit is installed which makes it headache in multi-developer scenarios where every person might not have the same tools installed
  • Removing the custom login and replacing with the SDK Xrm.Tooling login control – one of the things people have the most problems with and to this day I can’t explain why many still end up with an empty OrganizationService after connecting –also this removes the need to handle credentials and puts the onus on Microsoft to make sure it connects for everyone
  • Solution level mappings – should prevent having to re-connect when switching between projects in a solution, also out with the XML and in with JSON
  • Better code structure – since I didn’t know what I was doing last time out there were many things replicated and/or poorly implemented making it difficult for anyone else to pick it up and make changes – adding some level of abstraction to the core interactions that extensions rely on the work within the solutions system so it’s easier to consume without prior extension knowledge
  • Better NuGet support – to try and guide people down the right path I was choosing which versions of the various SDK assemblies got in installed when creating a new project, it worked well but relied on a lot of hardcoded stuff to make work and required updating when new major versions were released, putting stress on me to get an update out right away – this time new projects will be presented with a dynamic list of the required packages straight from NuGet, any version can be selected and will always be up to date
  • Web resource deployer – probably not too many fundamental changes from the previous version but still hoping to incorporate previous feedback I’ve received
  • Plug-in deployer – the current version is pretty basic and only handles moving the actual assembly and doesn’t address anything associated with the registration – what I’d like this time around is to address those gaps (effectively re-building parts of the Plug-in Registration Tool) and/or incorporating what Scott Durrow is doing with his SparkleXrm task runner, specifically around putting the registration details directly into the plug-in code and using it during deployment to handle setting up all the steps, images, configurations, etc. – as a person that often has to look at other people’s code I can tell you that having the registration details readily available in the code without having to open and click through another tool to figure out when it’s being executed is darn useful
  • Solution packager – probably not too many changes from the current implementation, maybe adding a deploy solution option
  • Report deployer – may get dropped, feels like it’s usefulness is lessened if you can only create reports in VS 2012
  • Early bound class creation – would love to have this functionality, hoping maybe to maybe see if Daryl LaBar will allow a port of his XrmToolbox implementation
  • Templates – would definitely like to explore other options, specifically around unit testing, maybe including some of the community testing frameworks – would really like to see someone develop a framework for JavaScript unit testing that incorporates CRM – maybe even VB templates for that 1 guy who gave the project 1 star on the VS Marketplace because it didn’t have them – also had thoughts about a tool that would capture data from a live CRM instance to incorporate into unit tests
  • Localization – would like to get all text into resource files so it can eventually support multiple languages
  • Documentation – provide better documentation how the project is put together and where to find things in hopes it makes it easier for others to contribute
  • Unit tests – actually including some - again hoping this will work toward being able to merge changes with more confidence and get quicker turn around

That brings us to what people could to do to help. But first let me share my opinion on something. It’s easy to sit back and call out Microsoft for not updating their tools to VS 2017 fast enough or to complain about this, that, or the other thing not working. As hard as I tried I’m not able to aid that cause (and I did try), but what I can do is solve the problem from a different angle which is delivering this alternative. So if you’ve made it this far and weren’t turned off by what I just said and are willing to help, this is what I’m looking for:

  • Ideas – I’d really like to hear about what other people are doing or what kinds of things would make CRM development easier or better. As this progresses, feedback on functionality is welcomed.
  • Code – Ideally I’m hoping a few people will actually want to get in and submit some pull requests. Willingness to learn a little about Visual Studio extensions is helpful but probably not required as most of that I’m willing to handle and/or expose in some manner. If there’s something you’re interested in and it isn’t in place, let me know and I’ll get it there. If you aren’t able or comfortable in submitting directly and have something like project or item templates or functionality built in WPF (user controls) that doesn’t rely too heavily on interaction with Visual Studio you can always send over something partially finished and I can try to get it added that way. Even going through and refactoring code or moving text to the resource files would be helpful.
  • Unit tests – probably a long shot but if you like writing them there’s plenty of opportunity.
  • Testing – I’ll try and get some early builds out that can used prior to final release to the VS Marketplace that can be installed manually.

If you’ve got something to say or are willing to help – post it on the GitHub Issues page for the project and I’ll be in touch. Or if you just think I'm nuts then I guess you could mention that too.

I love Dynamics 365/CRM as a platform and want to see others adopt it. My contributions are really meant to take away some of the barriers for entry into the space and get people solving business problems faster.

Work in progress:
https://github.com/jlattimer/CrmDeveloperExtensions2