CRM 2016 Web Resource Development in VS 2015


So, if you are like me I choose to have development of my CRM code in a single user interface. Visual Studio is my weapon of choice and with some simple configuration it can be used to also allow you to target your web resources as well to update code. I do not choose to revision through TFS, but use svn instead and this works for me.

This way I can do solution development, plugins, web resource development, or custom C#.Net web applications all from the same tool. In this short article I will talk about the configuration of web resources and how I manage them in CRM 2016 deployments. There are a few ways to do this, but this is the way that I find works best for me.

First a trip over to codeplex and make sure that you have downloaded the CRM Developer extensions at the following link https://visualstudiogallery.msdn.microsoft.com/0f9ab063-acec-4c55-bd6c-5eb7c6cffec4

This is an alternative to the options in the CRM Developer toolkit that shipped with CRM 2011 & 2013. If you are doing any development at all you should also make sure you have downloaded the CRM SDK as well located here. https://www.microsoft.com/en-us/download/details.aspx?id=50032

You will need to install the CRM developer extensions into your release of Visual Studio 2015.

You will next need to create a new web resources project in Visual Studio.

File–> New–> Project –> CRM Developer Extensions –> CRM Resource Project

WRproject

Once the project has been generated you should see the following option in your project named CRM Developer Extensions -> Web Resource Deployer.

webresourcedeployer

 

The web resource deployer is how you publish or download files from your custom CRM solutions.

In order to connect to your CRM production or development instance you will need to connect to it using the connections panel and choosing to add a new server connection.

configure server

When you add a new connection it will be remembered in CRM with the project. The CRM Developer Extension plugin works with an online (Office 365) or any on premise release CRM 2016.

connectionscreen

Once you have connected to CRM using the connectconnect to CRM button, you will be able to choose the solution that you want to download resources from, or the specific web resources you would like to push up and deploy.

The download functionality is very useful when you find yourself into a new CRM project that does not have revision control around resources in CRM, or when users update JS or HTML resources on the fly using the editor in CRM. This allows you to quickly move those custom resources into a new VS project and revision it properly.

Once you have setup your project and created some sample JS files you can choose to upload them into your solution in CRM 2016. You simply check the box of the items that you wish to publish and what solution you wish to publish the resources to and then click on the publish publish button to have these web resources deployed into CRM.

You will have to also note that publishing doesn’t make the web resource active it merely adds or updates the files in your solution. They are not fully published until you choose to publish the solution, then they will be made active.

 

Recent Posts