View Full Version : Ext.NET 4 on Visual Studio 2010

Feb 09, 2017, 1:32 PM
If you have Visual Studio 2010 and checked out Ext.NET 4, you'll see that it no longer supports VS2010 (chapter one here (http://examples4.ext.net/#/Getting_Started/Release_Documents/README/)).

But not all is lost! There's still ways to get Ext.NET up and running if you really can't afford to upgrade to any of the newer Visual Studio versions -- although we can't guarantee you everything is going to work, beginning with outdated libraries and infrastructure.

Before we can even think on upgrading, we need to check whether the NuGet extension for VS2010 is up-to-date. If not, and your version is too old, you won't be able to install Ext.NET package at all. It should not be too hard to upgrade NuGet extension though.

If you open the NuGet package manager dialog and there's an update, chances is that it will warn you on the dialog itself. But in the case you want to go directly to the point (or you just don't have the extension yet), you have to get to the Extension Manager dialog (Tools > Extensions Manager).

There you can either upgrade or install the NuGet extension thru the online gallery. You should have something like this in the end:


Now we can proceed with the new project and Ext.NET installation.

For the project, we are going to use the barest minimum, an empty Web Application. We have set it up via the File > New Project... menu like this:


Then we need to add the Ext.NET NuGet package. First open the NuGet package manager dialog for the project we just created:


Then, locate the Ext.NET package. There are other packages for MVC (and the corresponding MVC version) but we're going with just the WebForms one, for simplicity.


Once you start installation, it will check dependencies and ask you to accept. Please review the license agreements for the packages (the licenses are there for a reason, right?). If all good, accept the terms to proceed with the installation.


Then you should have Ext.NET installed and showing you its readme file.

All looking good, let's then open the example Ext.NET ASPX file for editing. On next post due to image amount limit per post. :)

Feb 09, 2017, 1:38 PM
Then, to our aspx file:


After opening then, a not so fortunate surprise! Errors in the console!


The fearsome red squiggles on server code:


And green squiggles on ext: tags as well!


If we just build the solution, all works just fine. But nevertheless, can't run the page, as we are going to show in the next post.

Feb 09, 2017, 1:53 PM
And here, the result when we run the page (without debugging, just so that we can use the browser's (IE11 in this case) debugging tools:

We have errors like "Ext" is undefined, strange text in the page instead of Ext.NET components:


And when we let the page finish loading, the view is far from what we wanted it to look:


So then we have to fix this. As VS2010 needs some extra settings in order to work, we have to adjust it. Let's open Web.config then to investigate if there's some hint on why it does not work on VS2010...

The Web.config file is not very long here, so there's not much to investigate. Only 40 lines long. But at a first glance, there's something that jumps over the rest: a block of commented code, that mentions IIS6. That in fact is the IIS version for the times VS2010 was the "current IDE".


So then, let's uncomment this and see what happens. I expect VS2010 to be using IIS Express 6 anyway...

This is how the Web.config file will look like after uncommenting (not reindenting):


So now, let's save it (in the shot above we just saved the Web.config file after removing the comments) and check how's the code.

Feb 09, 2017, 1:58 PM
I didn't even need to close and re-open the file, it was already looking good as I just tabbed back to it.

No red squiggles:


Oh! And no green squiggles either!


So let's just jump back at the page we opened and refresh it and...


Crystal clear console! Notice the red arrows with text were added by me to illustrate the page, you won't be seeing them on your side if you try and follow this guide! :)