PDA

View Full Version : [CLOSED] Current trunk changes require MVC in build



michaeld
Jul 17, 2013, 5:41 AM
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.

Daniil
Jul 17, 2013, 7:03 AM
Hi @michaeld,

Thank you for the report. We will fix.

Daniil
Jul 17, 2013, 5:05 PM
It has been fixed in SVN trunk.

michaeld
Jul 27, 2013, 7:09 AM
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.

Vladimir
Jul 28, 2013, 8:27 PM
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)

michaeld
Jul 29, 2013, 5:14 AM
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