Microsoft Dynamics Crm Web Resources Updater


Download button will redirect you to Visual Studio Gallery

Overview

Microsoft Dynamics CRM Web Resources Updater gives you an easy way to update and publish web resources directly from Visual Studio. Add-on updates only web resources that are differ. So it takes as little time as possible to publish web resources. You can configure add-on to automatically publish just updated web resources.

The main reason this tool was created is JavaScript's development and debugging processes speed up.

What this tool do

  • Uploads web resources that are differ into Microsoft Dynamics CRM
  • Publishes updated web resources
What this tool doesn't do
  • It doesn't create new web resource if there is not appropriate web resource for a file you want to upload. (You can do it manually because it is onetime task or take a look on XrmToolbox)

If you have any issue with addon, question or comment feel free to leave a comment at the bottom of the page.


How does it work?

As soon as you have add-on installed you will get two additional menu items for each project:

You have to set-up connection to Microsoft Dynamics CRM solution you are working on before start using add-on (see Configuration Section).

To update web resources just press "Update Web Resources". Add-on will ask CRM for all web resources that belong to Microsoft Dynamics CRM solution. As second step it will try to find appropriate web resource for each file from you project and if content is differ it will update it. If you configured add-on to atomically publish updated web resources, it will do it for you.

You can also publish selected web resource, to do that just right click on web resource and select "Update Web Resource":


Important

Add-on defines web resource to be updated by comparing file name (with extension) and web resource name. Let's say we have ec_contact.js in the project. Add-on will look for a web resource with name ec_contact.js to update its content.

You can set-up tool to search web resource by file name with and without extension:

You can also use mapping file to map files in your project and web resources (see section "USING MAPPING FILE" below).

Using add-on assumes that web resources for each Microsoft Dynamics CRM solution you are working on are stored in separated projects. Such projects do not take part in building Visual Studio solution. Add-on enables you to configure separated connection for each project and publish web resources for each project (Microsoft Dynamics CRM solution) separately.



How to start?


Installation

Configuration

To configure add-on for a project right-click on project and select "Updater Options". Following window will be opened:



Press "New connection" as shown:



Connection set-up window will be opened. Fill-in appropriate fields and press Button "OK":



As soon as you create new connection it will be listed in the grid as shown:



Select just created connection using dropdown list. Set check box if you want updated web resources to be published. Press button "Save".

That's all. Now you are ready to use add-on.

Using Mapping File

Mapping files allows having custom mapping between files in your project and web resources names. To create mapping file just press on “Create mapping File”:



New file will be added to your project. Use following syntax to define mapping:
<Mapping scriptPath="scripts\contact.js" webResourceName="new_contact"/> <Mapping scriptPath="account.js" webResourceName="new_account"/>



Source code

The source code for this extension is available on CodePlex. Feel free to take it and add stuff you're missing.

13 comments

avatar

Hi
is there a way to link the update function with keyboard shortcut

avatar

Hello,
Very useful extension. Thanks for sharing it.

Since CodePlex is down, It would be nice to move the code to GitHub ;)

Cheers.

avatar

I am happy that I found your post while searching for informative posts. It is very useful.Thanks for sharing.
Microsoft Dynamics AX Online Training

avatar

I always like and search such topics and everything connected to them.Excellent and very cool idea and the subject at the top of magnificence
CRM Software In India
CRM Software In Chennai

avatar

Hello,
I need to find the configuration file with my connections.
Can someone direct me to a folder where I can find it, please?

Thanks in advance!

avatar

Hello, I am having trouble to connect. I got this error message
An error occurred while retrieving organization: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code detail.
Inner Exception: Authentication Failure

avatar

VS throws error when mapping file is deleted, then there is no way to re-create it as plugin error out on load.

avatar

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CrmWebResourcesUpdater.UpdaterOptions.d__7.MoveNext() in C:\Users\Seraphim\source\repos\CrmWebResourcesUpdater\CrmWebResourcesUpdater\Commands\UpdaterOptions.cs:line 52Failed to convert connections: There is an error in XML document (23, 6).An error occured: Value does not fall within the expected range.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.Shell.Settings.ShellSettingsStore.GetString(String collectionPath, String propertyName)
at Microsoft.VisualStudio.Shell.Settings.ShellWritableSettingsStore.GetString(String collectionPath, String propertyName)
at CrmWebResourcesUpdater.Settings.Load()
at CrmWebResourcesUpdater.Settings..ctor(IAsyncServiceProvider serviceProvider, Guid projectGuid)
at CrmWebResourcesUpdater.Services.SettingsService.d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---

avatar

Hi,

I'm trying create a new connection using Connection Wizard and I kept getting this error: Method not found: 'System.String Microsoft.Xrm.Sdk.Discovery.OrganizationDetail.get_TenantId()'

I was able to create new connection in the past without any issue. Does anybody know how to fix this issue?

Thanks,

Dzung.

avatar

We are seeing the same error as @barry has. It references (probably your) user folder for a file when creating a new web resource. Is there an update on the way?

avatar

New error after recent MS updates

Failed to publish script.
ERROR REQUESTING ORGS FROM THE DISCOVERY SERVER
ERROR REQUESTING ORGS FROM THE DISCOVERY SERVERFCB 'EnableRegionalDisco' is disabledUnable to connect to CRM: FCB 'EnableRegionalDisco' is disabled
FCB 'EnableRegionalDisco' is disabledUnable to Login to Dynamics CRM
Unable to Login to Dynamics CRM

avatar

It fails if any custom solution is selected. Default solution works ok

avatar

The Update Web Resource(s) command stopped working suddenly about a month ago.
Nothing is written in the output window when trying to update a specific web resource.
Uninstalling and Reinstalling the extension didn't help
Same goes for the update of the entire web resources
I'll appreciate your help in resolving this matter