Install and Setup Guide for Visual Studio

Page 1 of 5 123 ... LastLast
  1. #1

    Install and Setup Guide for Visual Studio

    Instructions in Portuguese
    Hi everyone,

    I have been spending the day working with Ext.NET and so far I am loving it. I have been looking for something like this for over a year now and am excited to get started with it.

    I wanted to give back by sharing my experience with setting up and installing Ext.NET with Visual Studio. I had noticed there was not a step by step instructions for people who are new to Ext.NET and thought I would try to help out by adding this guide on how to start using Ext.NET within your project. Hopefully this will help out someone if they are get getting started with Ext.NET and ASP.NET

    This is the setup I used for installing and setting up Ext.NET within Visual Studio 2010 (or 2012). I have tested it with the .NET 4.0 framework and have not had any problems.

    Automated Installation Instructions

    The easiest and quickest way to install Ext.NET is using NuGet.

    Run the following command in Visual Studio Command panel, or seach for "Ext.NET" in NuGet Package Manager.

    Install-Package Ext.NET
    Installation Video

    Two installation videos (long & short) demonstrating how to instal using NuGet are available.



    Manual Installation Instructions


    1. Download the latest version from http://ext.net/download/.
    2. Unzip the contents of the .zip file into a directory on your local machine.

      Add references to Ext.Net
    3. In the Solution Explorer of your web project, right-click on the project and select "Add Reference...".
    4. Click the Add button and then the browse tab.
    5. Browse to the location you unzipped the download package and select the following files:

      Ext.Net.dll
      Ext.Net.Utilties.dll
      Newtonsoft.Json.dll
      Transformer.NET.dll
    6. Click Ok.
    7. Save your project.

      Web.config changes
    8. Open your web.config file. You will need to ensure the following Ext.NET nodes are added to your Web.config file. A sample Web.config file is also provided in the .zip download package.

      <?xml version="1.0"?>
      <configuration>
        <configSections>
          <section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" />
        </configSections>
      
        <extnet theme="Gray" />
        
        <pages>
          <controls>
            <add assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext" />
          </controls>
        </pages>
      
        <!-- 
            The following system.web section is only requited for running ASP.NET AJAX under Internet
            Information Services 6.0 (or earlier).  This section is not necessary for IIS 7.0 or later.
        -->
        <system.web>
          <httpHandlers>
            <add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
          </httpHandlers>
          <httpModules>
            <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
          </httpModules>
        </system.web>
      
          <!-- 
              The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0.
              It is not necessary for previous version of IIS.
          -->
          <system.webServer>
              <validation validateIntegratedModeConfiguration="false" />
              <modules>
            <add 
              name="DirectRequestModule" 
              preCondition="managedHandler" 
              type="Ext.Net.DirectRequestModule, Ext.Net"
              />
          </modules>
              <handlers>
            <add 
              name="DirectRequestHandler" 
              verb="*" 
              path="*/ext.axd" 
              preCondition="integratedMode" 
              type="Ext.Net.ResourceHandler"
              />
          </handlers>
        </system.webServer>
        <runtime>
          <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
              <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
              <bindingRedirect oldVersion="1.0.0.0-4.5.10" newVersion="4.5.11" />
            </dependentAssembly>
            <dependentAssembly>
              <assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23" />
              <bindingRedirect oldVersion="0.0.0.0-2.1.0" newVersion="2.2.0" />
            </dependentAssembly>
            <dependentAssembly>
              <assemblyIdentity name="Transformer.NET" publicKeyToken="e274d618e7c603a7" />
              <bindingRedirect oldVersion="0.0.0.0-2.1.0" newVersion="2.1.1" />
            </dependentAssembly>
          </assemblyBinding>
        </runtime>
      </configuration>
    9. Testing within your project:

      Before you begin I would suggest doing a Build Clean and Rebuild to confirm all the new changes are set.

      Copy/paste the following sample into a .aspx within your project:

      <%@ Page Language="C#" %>
      
      <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
      
      <script runat="server">
          protected void Button1_Click(object sender, DirectEventArgs e)
          {
              X.Msg.Notify(new NotificationConfig { 
                  Icon  = Icon.Accept,
                  Title = "Working",
                  Html  = this.TextArea1.Text
              }).Show();
          }
      </script>
      
      <!DOCTYPE html>
          
      <html>
      <head runat="server">
          <title>Ext.NET Example</title>
      </head>
      <body>
          <ext:ResourceManager runat="server" Theme="Gray" />
          
          <form runat="server">
              <ext:Panel 
                  ID="Window1"
                  runat="server" 
                  Title="Welcome to Ext.NET"
                  Height="215"
                  Width="350"
                  Frame="true"
                  Collapsible="true"
                  Cls="box"
                  BodyPadding="5"
                  DefaultButton="0"
                  Layout="AnchorLayout"
                  DefaultAnchor="100%">
                  <Items>
                      <ext:TextArea 
                          ID="TextArea1" 
                          runat="server" 
                          EmptyText=">> Enter a Test Message Here <<"
                          FieldLabel="Message" 
                          Height="85" 
                          />
                  </Items>
                  <Buttons>
                      <ext:Button 
                          ID="Button1"
                          runat="server" 
                          Text="Submit"
                          Icon="Accept" 
                          OnDirectClick="Button1_Click" 
                          />
                  </Buttons>
              </ext:Panel>
          </form>
      </body>
      </html>
    10. Right-click on the page, and select "View in Browser".

      The Page will open a browser and render.

    Problems, Errors and Issues:

    Here are some common problems you may run into and how to solve the problems.


    1. Question: The ResourceManager Control is missing from this Page.
    2. Answer: You did not add the ResourceManager to your page. Add the following tag UNDER your <body> tag:

      <ext:ResourceManager runat="server" />
    3. Question: Parser Error Message: Unknown server tag '<ext:ResourceManager>'.
      Answer: Add the following under your page directive (under the <@Page> tag):

      <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    4. Question: The web.config file for this project is missing the required DirectRequestModule.
      Answer: Please ensure you updated your Web.config file as per the sample above. Please ensure you recompile your project, or you have more then 1 reference to the <system.web> or <system.webserver> tags.
    5. Question: Everything worked on your local development machine but not staging or live server
      Answer: Confirm you have uploaded all the .dll files to the /bin/ directory of your project, and that the Web.config has been uploaded.



    To Add Ext.NET to your Visual Studio Toolbox

    1. Open an existing web site or create a new web site project.
    2. Open or create a new .aspx page.
    3. Open the ToolBox panel, typically located on the left side in a fly-out panel (Ctrl + Alt + x).
    4. Create a new "Ext.NET" Tab, by...

      a. Right-Click in the ToolBox area.
      b. Select "Add Tab".
      c. Enter "Ext.NET".
    5. Inside the "Ext.NET" tab, Right-Click and select "Choose Items...".
    6. Under the ".NET Framework Components" Tab select the "Browse" button.
    7. Navigate to and select the Ext.Net.dll file, choose open, then select the "Ext.NET.dll" from the extracted download .zip package.

      Ext.NET can always be downloaded from the following location, see http://www.ext.net/download/
    8. The component items should now be added to the list and pre-checked. You can confirm by sorting the list by "Namespace" and scrolling to "Ext.Net"
    9. Click "OK". The icons should be added to your ToolBox. You should now be able to drag/drop a Ext.NET component onto your WebForm.

      NOTE: Visual Design Mode support is currently very limited. Future releases hope to improve on this functionality.
    10. Enjoy.



    EDIT : 2013-04-16 [geoffrey.mcgill] Update with some new information regarding NuGet package and general revisions.
    Last edited by geoffrey.mcgill; May 06, 2014 at 11:23 PM.
  2. #2
    Question: "The web.config file for this project is missing the required DirectRequestModule."
    Answer: You did not update your web.config file, did not rebuild your project, or you have more then 1 reference to the <system.web> or <system.webserver> tags.
    What do you mean by "more than 1 reference" ??
    I got this error in my project and cannot find the way to solve it..
    I follow all your procedure and include all necessary stuff in my web.config but I still got this error!

    I've created another project to test all this.. no error! But my other (bigger) project still give me headaches!
    Can this be related to MasterPage? Should I place the RessourceManager in the MasterPage or in each WebPage?

    Thanks ;)
  3. #3
    Hi urbn,

    Thank for sharing your experience!
  4. #4
    Quote Originally Posted by zetvioo View Post
    Can this be related to MasterPage? Should I place the RessourceManager in the MasterPage or in each WebPage?
    There should be ResourceManger control in MasterPage.

    each WebPage
    User control? If yes, there must not be ResourceManger control, because a user control is rendered to the same page as a content of MasterPage. Only one ResourceManager control must be on a single page.

    There should be ResourceManager control on .aspx pages which are loaded to a separate frame.
  5. #5

    Can't find ext.net.dll

    Hi,
    I am very new to the .net world and trying to add a reference for the first time. I am using this guide to do the installation but I can't find the ext.net.dll referede to in the point 3.

    I am using the zip file downloaded from this site which is called : ext.net.pro.1.0rc2.full.source. Is this the wrong file to use? or is the file just missing? is there another way to do this?

    Thanks for helpinging out a rookie.
    Bert

    UPDATE: Downloaded the wrong file. I found the files I was looking for.

    Thanks,
    Bert
  6. #6
    To get dlls from
    ext.net.pro.1.0rc2.full.source
    you need to build the Ext.Net solution.

    Then you will find all required dlls within the bin folder of Ext.Net project.

    But, certainly, you can use ready dlls, if you don't need to investigate its sources.
  7. #7
    Thanks ,it is highly detailed
  8. #8

    imported namespaces

    Hi, I'm using visual studio 2010 and can do all the steps to number 11, but when doing number 12, I don't know where is that option called Imported Namespaces. I can't scroll down anything right after clicking OK in the Add Reference windows.

    Help, please?
    Thanks in advance.
  9. #9
    Quote Originally Posted by abelvn View Post
    Hi, I'm using visual studio 2010 and can do all the steps to number 11, but when doing number 12, I don't know where is that option called Imported Namespaces. I can't scroll down anything right after clicking OK in the Add Reference windows.

    Help, please?
    Thanks in advance.
    Need this same help, Thanks
  10. #10
    Hi @abelvn and @mrmaldivian,

    I'm not sure what @urbn meant by #12.

    Anyway, it's not required to use Ext.Net. Just add the respective 3 Ext.Net references.
Page 1 of 5 123 ... LastLast

Similar Threads

  1. cant install visual studio 2012 and 2011
    By gamemaker825 in forum 2.x Help
    Replies: 0
    Last Post: Jul 22, 2012, 4:11 PM
  2. Visual Studio Designer
    By maksim in forum 1.x Help
    Replies: 2
    Last Post: Apr 08, 2012, 11:43 AM
  3. Visual Studio 2010
    By speddi in forum 1.x Help
    Replies: 2
    Last Post: Oct 11, 2010, 2:42 PM
  4. Visual Studio 2010
    By Kaido in forum 1.x Help
    Replies: 2
    Last Post: Aug 12, 2010, 9:17 PM
  5. Visual Studio 2010
    By drgw74 in forum Open Discussions
    Replies: 7
    Last Post: Jun 24, 2010, 8:59 AM

Posting Permissions