Changes the web.config template to use a linked resources (one file)

This commit is contained in:
Shannon
2013-11-26 20:03:13 +11:00
parent 327d17c90e
commit 2391ee1368
8 changed files with 17 additions and 84 deletions

View File

@@ -84,7 +84,7 @@ namespace Umbraco.Web.Mvc
{
using (var writer = File.CreateText(Path.Combine(viewFolder, "web.config")))
{
writer.Write(Strings.web_config);
writer.Write(Strings.WebConfigTemplate);
}
}
}

View File

@@ -54,7 +54,7 @@ namespace Umbraco.Web.Mvc
{
using (var writer = File.CreateText(Path.Combine(viewFolder, "web.config")))
{
writer.Write(Strings.web_config);
writer.Write(Strings.WebConfigTemplate);
}
}
//auto create the partials folder

View File

@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18034
// Runtime Version:4.0.30319.34003
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -62,21 +62,16 @@ namespace Umbraco.Web.Mvc {
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot;?&gt;
///
///&lt;configuration&gt;
/// &lt;system.web.webPages.razor&gt;
/// &lt;host factoryType=&quot;System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; /&gt;
/// &lt;pages pageBaseType=&quot;System.Web.Mvc.WebViewPage&quot;&gt;
/// &lt;namespaces&gt;
/// &lt;add namespace=&quot;System.Web.Mvc&quot; /&gt;
/// &lt;add namespace=&quot;System.Web.Mvc.Ajax&quot; /&gt;
/// &lt;add namespace=&quot;System.Web.Mvc.Html&quot; /&gt;
/// &lt;add namespace=&quot;System.Web.Routing&quot; /&gt;
/// &lt;add namespace=&quot;Umbra [rest of string was truncated]&quot;;.
///
/// &lt;configSections&gt;
/// &lt;sectionGroup name=&quot;system.web.webPages.razor&quot; type=&quot;System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;&gt;
/// &lt;section name=&quot;host&quot; type=&quot;System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; /&gt;
/// &lt;section name=&quot;page [rest of string was truncated]&quot;;.
/// </summary>
internal static string web_config {
internal static string WebConfigTemplate {
get {
return ResourceManager.GetString("web_config", resourceCulture);
return ResourceManager.GetString("WebConfigTemplate", resourceCulture);
}
}
}

View File

@@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="web_config" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>web.config.template;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
<data name="WebConfigTemplate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\umbraco.web.ui\views\web.config;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>

View File

@@ -1,65 +0,0 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="Umbraco.Web" />
<add namespace="Umbraco.Core" />
<add namespace="Umbraco.Core.Models" />
<add namespace="Umbraco.Web.Mvc" />
<add namespace="Microsoft.Web.Helpers" />
<add namespace="umbraco" />
<add namespace="Examine" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
<!--
Enabling request validation in view pages would cause validation to occur
after the input has already been processed by the controller. By default
MVC performs request validation before a controller processes the input.
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>

View File

@@ -9,7 +9,7 @@ namespace Umbraco.Web.UI.JavaScript
{
/// <summary>
/// Can allow developers to add custom variables on startup
/// Could allow developers to add custom variables on startup - not sure if we want to allow that ? maybe.
/// </summary>
internal static EventHandler<Dictionary<string, object>> Parsing;

View File

@@ -1791,6 +1791,9 @@
<SubType>Component</SubType>
</Compile>
<Compile Include="WebViewPageExtensions.cs" />
<None Include="..\Umbraco.Web.UI\Views\web.config">
<Link>Mvc\web.config</Link>
</None>
<None Include="Web References\org.umbraco.our\Reference.map">
<Generator>MSDiscoCodeGenerator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
@@ -1901,7 +1904,6 @@
</Content>
<Content Include="umbraco.presentation\umbraco\plugins\tinymce3\tinymce3tinymceCompress.aspx" />
<None Include="app.config" />
<None Include="Mvc\web.config.template" />
<None Include="packages.config" />
<None Include="Web References\org.umbraco.our\repository.wsdl" />
<None Include="Web References\org.umbraco.update\UpgradeResult.datasource">

View File

@@ -40,6 +40,7 @@ namespace umbraco.cms
/// </summary>
/// <param name="resolver"></param>
/// <returns></returns>
[Obsolete("We don't use IMediaFactory anymore, we need to remove this when we remove the MediaFactory instance that uses this method")]
internal static IEnumerable<Type> ResolveMediaFactories(this PluginManager resolver)
{
return resolver.ResolveTypes<IMediaFactory>();