We have an MVC 5 project that has been around for a while, including several DevExpress releases. Lately, every single time we go to update to the latest DevExpress version, everything is just great, except when attempting to figure out how in the world we update DevExtreme.
We are referencing DevExtreme via the MVC wrappers (so using things like Dashboard for example). We have a reference to the DevExtreme.AspNet.Mvc and DevExtreme.AspNet.Data packages.
A while ago we actually had to "upgrade" from the "old" Dashboard to the "new" Dashboard?, and stumbled upon:
In that document, under Wrappers -> Automatic Integration, it *appears* to say something along the lines of "just add these two lines to your web.config and DevExpress libraries (via web handles or some other magic) will automagically serve the correct js/css for devextreme and its dependencies!"
So, we ended up doing that, since it seemed faster than trying to track down all those dependencies. We found we needed to comment out a bunch of lines from our RegisterBundles code (basically all the dependencies, but keeping just dx.all.js and dx.aspnet.mvc.js and the like) otherwise we'd get errors about script loads clobbering one another.
That RegisterBundles code came from here:
Which seems to have an entirely different opinion on how to integrate DevExtreme (not just two lines in web.config, but a whole bunch of file copies and script and style bundles and other stuff).
We also always try to just click the "Upgrade DevExtreme Resources" right click menu item in Visual Studio, but it will fail with messages about not being able to remove DevExtreme.AspNet.Data because the DevExtreme.AspNet.Mvc package depends on it.
We also found this: https://www.devexpress.com/Support/Center/Question/Details/T507978/how-to-use-devextreme-and-devexpress-asp-net-mvc-extensions-in-the-same-application which makes it seem that maybe that is actually the best way to reference DevExtreme when using MVC?
So... of the various documented ways of support DevExtreme MVC on MVC 5, which is the "correct" one for us? I'm hoping the correct one might be along the lines of:1. Reference the (latest version of the) DevExtreme.AspNet.Mvc package
2. Add those automagic lines to web.config
4. Also, you can delete the dependency cruft of cldr and globalize and other various local js files, since DevExtreme/Express serves them via those web.config lines from... somewhere else????
Thank you for the update. This algorithm is correct. It is unnecessary to add additional resources manually when you are using the resources section in web.config.
I want only to note that it is necessary to use the same versions of server-side and client-side packages, i.e. it is necessary to make sure that:
2. The version of the AspNet.Data NuGet package and the dx.aspnet.data.js file is the same.
Let me know if you have further questions.