[CLOSED] Current trunk changes require MVC in build

  1. #1

    [CLOSED] Current trunk changes require MVC in build

    Ext.Net\Ext.Net\Utility\ScriptBuilders\BaseScriptB uilder.cs
            protected virtual void RestoreResourceManager()
            {
                Page page = null;
                bool isMVC = Ext.Net.MVC.MvcResourceManager.IsMVC; //           COMPILE ERROR: NOT DEFINED if MVC not defined
    
    
                if (HttpContext.Current != null && HttpContext.Current.CurrentHandler is Page)
                {
                    page = (Page)HttpContext.Current.CurrentHandler;
                    page.Items[typeof(ResourceManager)] = this.oldRM;
                    if (!isMVC && page is System.Web.Mvc.ViewPage) //                 COMPILE ERROR: NOT PRESENT if MVC not defined
                    {
                        isMVC = true;
                    }
                }
    
    
                if (isMVC)
                {
                    HttpContext.Current.Items[typeof(ResourceManager)] = this.oldRM;
                }
            }


    New section of code needs to be wraped in #if MVC

    MVC creates requirement for distribution of MVC dlls onto production servers even if just using WebForms.
    Last edited by Daniil; Jul 17, 2013 at 4:06 PM. Reason: [CLOSED]
  2. #2
    Hi @michaeld,

    Thank you for the report. We will fix.
  3. #3
    It has been fixed in SVN trunk.
  4. #4
    And I doing something wrong? I haven't seen it go in.

    This is how I fixed it. I've been watching to revert to the trunk but haven't seen anything close.

    Index: C:/Users/Michael/Documents/Visual Studio 2012/Projects/Ext.Net/Ext.Net/Utility/ScriptBuilders/BaseScriptBuilder.cs===================================================================
    --- C:/Users/Michael/Documents/Visual Studio 2012/Projects/Ext.Net/Ext.Net/Utility/ScriptBuilders/BaseScriptBuilder.cs    (revision 5279)
    +++ C:/Users/Michael/Documents/Visual Studio 2012/Projects/Ext.Net/Ext.Net/Utility/ScriptBuilders/BaseScriptBuilder.cs    (working copy)
    @@ -534,6 +534,7 @@
                 return false;
             }
     
    +#if MVC
             ResourceManager oldRM;
             
             /// <summary>
    @@ -571,7 +572,8 @@
                     HttpContext.Current.Items[typeof(ResourceManager)] = this.oldRM;
                 }
             }
    -    }
    +#endif
    +    }
     
         /// <summary>
         ///
    This if my unified diff from the trunk.
  5. #5
    What do you mean? At this moment, the following code is used in SVN
    protected virtual void RestoreResourceManager()
            {
                Page page = null;
    #if MVC
                bool isMVC = Ext.Net.MVC.MvcResourceManager.IsMVC;
    #else
                bool isMVC = false;
    #endif
    
    
                if (HttpContext.Current != null && HttpContext.Current.CurrentHandler is Page)
                {
                    page = (Page)HttpContext.Current.CurrentHandler;
                    page.Items[typeof(ResourceManager)] = this.oldRM;
    
    
    #if MVC
                    if (!isMVC && page is System.Web.Mvc.ViewPage)
                    {
                        isMVC = true;
                    }
    #endif
                }
    
    
                if (isMVC)
                {
                    HttpContext.Current.Items[typeof(ResourceManager)] = this.oldRM;
                }
            }
    It compiles fine if WebForm configuration is chose (MVC assemblies is not required)
  6. #6
    I've reverted this file and it's working now. I do not know why it did not show your changes when I ran TortoiseSVN compare against the trunk. :shrug:

    Sorry for the confusion

Similar Threads

  1. Replies: 2
    Last Post: Jun 06, 2013, 9:36 PM
  2. Replies: 5
    Last Post: Jun 03, 2013, 4:35 AM
  3. [CLOSED] premium/trunk/Ext.Net does not build
    By michaeld in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 25, 2013, 5:25 AM
  4. [CLOSED] Can not build Trunk with .NET35 build configuration
    By jchau in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 24, 2012, 2:20 PM
  5. [CLOSED] [1.0] Dataview should not require a store
    By jchau in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 16, 2010, 7:41 PM

Posting Permissions