I just had an immediate need for modifying the core Ext.Net scripts that are embedded into the toolkit assembly itself. Till now, I resisted all temptations for doing so earlier, instead choosing to override Ext.Net behavior when needed by including my own scripts after the Ext.Net scripts on the page.

But this time, Ext.Net introduced a major breaking change for an extensive codebase of ours by replacing the core ExtJs Observable constructor. And this was done through an anonymous function in javascript leaving us with no choice but having to manually edit the Observable.js script file and re-building the toolkit again.

So, here are the steps to modify Ext.Net script files and re-build the toolkit should you ever need to do so:

  1. Find the script file(s) you need to modify. You would find them under this folder hierarchy from the root of Ext.Net SVN repository:
    Ext.Net\Build\Ext.Net\extnet

    You will see here 2 sub-folders, core and data. Your desired file to be edited should be in the core sub-folder (or one of its sub-sub-folders) in most of the cases.

  2. After you have located the file(s), make the desired changes and save the file(s).
  3. Go back to this folder:
    Ext.Net\Build\Ext.Net\extnet
  4. You would find a build.bat file here.
  5. Either just double-click that file or execute it from a command-prompt (you would be able to see the output of execution only when you execute it from command prompt). 
  6. Open the Ext.Net solution in Visual Studio.
  7. Re-build the solution.

You can now fetch the updated toolkit dll from the familiar bin\Release (or bin\Debug) folder inside the Ext.Net folder.

The procedure for editing or adding other resources (e.g. embedded images, css files, ExtJs resources etc.) would be a bit different from the above process. Please let me know if someone needs to modify them, and I would write a separate blog post for the same.

UPDATE:

  • As Ext.Net team member Geoffrey points out in the comments below, it is best to avoid modifying Ext.Net source files itself. It gets difficult to maintain with SVN updates or subsequent releases, and most of the time, you can easily replace or override Ext.Net/ExtJs client side behavior.

    However, in case you find yourself having to modify the source with no other easy option (as I have found myself in some cases) the above steps should help you… Cheers to Ext.Net team for such a powerful toolkit..