mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -72,8 +72,6 @@
|
|||||||
|
|
||||||
<!-- Packaging -->
|
<!-- Packaging -->
|
||||||
|
|
||||||
<UsingTask AssemblyFile="$(MsBuildTasksFolder)\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.XmlDelete" />
|
|
||||||
|
|
||||||
<Target Name="Package-ForCloud">
|
<Target Name="Package-ForCloud">
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -113,24 +111,6 @@
|
|||||||
XPath="/log4net/root/priority/@value"
|
XPath="/log4net/root/priority/@value"
|
||||||
Value="ERROR" />
|
Value="ERROR" />
|
||||||
|
|
||||||
<XmlDelete XmlFileName="$(CloudRootFolder)\Config\log4net.config"
|
|
||||||
XPath="/log4net/appender[@name='debug-file']" />
|
|
||||||
|
|
||||||
<XmlDelete XmlFileName="$(CloudRootFolder)\Config\log4net.config"
|
|
||||||
XPath="/log4net/appender[@name='debugger']" />
|
|
||||||
|
|
||||||
<XmlDelete XmlFileName="$(CloudRootFolder)\Config\log4net.config"
|
|
||||||
XPath="/log4net/appender[@name='error-file']/filter" />
|
|
||||||
|
|
||||||
<XmlDelete XmlFileName="$(CloudRootFolder)\Config\log4net.config"
|
|
||||||
XPath="/log4net/logger[@name='Orchard.Localization']" />
|
|
||||||
|
|
||||||
<XmlDelete XmlFileName="$(CloudRootFolder)\Config\log4net.config"
|
|
||||||
XPath="/log4net/logger[@name='Orchard']" />
|
|
||||||
|
|
||||||
<XmlDelete XmlFileName="$(CloudRootFolder)\Config\log4net.config"
|
|
||||||
XPath="/log4net/root/appender-ref[@ref='debug-file']" />
|
|
||||||
|
|
||||||
<Copy
|
<Copy
|
||||||
SourceFiles="$(SrcFolder)\Orchard.Azure\Orchard.Azure.CloudService\ServiceConfiguration.cscfg"
|
SourceFiles="$(SrcFolder)\Orchard.Azure\Orchard.Azure.CloudService\ServiceConfiguration.cscfg"
|
||||||
DestinationFolder="$(StageFolder)"
|
DestinationFolder="$(StageFolder)"
|
||||||
@@ -155,7 +135,7 @@
|
|||||||
<Target Name="Package-Stage">
|
<Target Name="Package-Stage">
|
||||||
|
|
||||||
<Exec
|
<Exec
|
||||||
Command=""$(ServiceHostingSDKBinDir)cspack" "$(ServiceFolder)\ServiceDefinition.csdef" /role:Orchard.Azure.Web;"$(CloudRootFolder)";Orchard.Azure.Web.dll /rolePropertiesFile:Orchard.Azure.Web;"$(ServiceFolder)\Properties.txt" /out:"$(StageFolder)\Orchard.Azure.Web.cspkg""
|
Command=""$(ServiceHostingSDKBinDir)cspack" "$(ServiceFolder)\ServiceDefinition.build.csdef" /role:Orchard.Azure.Web;"$(CloudRootFolder)";Orchard.Azure.Web.dll /rolePropertiesFile:Orchard.Azure.Web;"$(ServiceFolder)\Properties.txt" /out:"$(StageFolder)\Orchard.Azure.Web.cspkg""
|
||||||
WorkingDirectory="$(CloudRootFolder)"
|
WorkingDirectory="$(CloudRootFolder)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
SET CDIR = %CD%
|
|
||||||
call "%ProgramFiles%\Windows Azure SDK\v1.2\bin\setenv.cmd"
|
|
||||||
csrun /devstore
|
|
||||||
csrun /run:"%CDIR %\build\Compile\Orchard.Azure.CloudService.csx";"%CDIR %\src\Orchard.Azure\Orchard.Azure.CloudService\ServiceConfiguration.cscfg" /launchbrowser
|
|
||||||
pause
|
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="AzureSDK" value="C:\Program Files\Windows Azure SDK\v1.2\"/>
|
<add key="AzureSDK" value="C:\Program Files\Windows Azure SDK\v1.3\"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||||
|
@@ -55,7 +55,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<Reference Include="Moq, Version=4.0.812.4, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
<Reference Include="Moq, Version=4.0.812.4, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\lib\moq\Moq.dll</HintPath>
|
<HintPath>..\..\lib\moq\Moq.dll</HintPath>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<ServiceConfiguration serviceName="OrchardCloudService" osVersion="*" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
|
<ServiceConfiguration serviceName="OrchardCloudService" osFamily="1" osVersion="*" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
|
||||||
<Role name="Orchard.Azure.Web">
|
<Role name="Orchard.Azure.Web">
|
||||||
<Instances count="1" />
|
<Instances count="1" />
|
||||||
<ConfigurationSettings>
|
<ConfigurationSettings>
|
||||||
|
@@ -1,11 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ServiceDefinition name="OrchardCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
|
<ServiceDefinition name="OrchardCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
|
||||||
<WebRole name="Orchard.Azure.Web">
|
<WebRole name="Orchard.Azure.Web">
|
||||||
|
<Sites>
|
||||||
|
<Site name="Web">
|
||||||
|
<Bindings>
|
||||||
|
<Binding name="HttpIn" endpointName="HttpIn" />
|
||||||
|
</Bindings>
|
||||||
|
</Site>
|
||||||
|
</Sites>
|
||||||
<ConfigurationSettings>
|
<ConfigurationSettings>
|
||||||
<Setting name="DataConnectionString" />
|
<Setting name="DataConnectionString" />
|
||||||
</ConfigurationSettings>
|
</ConfigurationSettings>
|
||||||
<InputEndpoints>
|
<Endpoints>
|
||||||
<InputEndpoint name="HttpIn" protocol="http" port="80" />
|
<InputEndpoint name="HttpIn" protocol="http" port="80" />
|
||||||
</InputEndpoints>
|
</Endpoints>
|
||||||
</WebRole>
|
</WebRole>
|
||||||
</ServiceDefinition>
|
</ServiceDefinition>
|
@@ -1,7 +1,10 @@
|
|||||||
using System.Web;
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
|
using Microsoft.WindowsAzure;
|
||||||
|
using Microsoft.WindowsAzure.ServiceRuntime;
|
||||||
using Orchard.Environment;
|
using Orchard.Environment;
|
||||||
|
|
||||||
namespace Orchard.Azure.Web {
|
namespace Orchard.Azure.Web {
|
||||||
@@ -16,6 +19,21 @@ namespace Orchard.Azure.Web {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void Application_Start() {
|
protected void Application_Start() {
|
||||||
|
CloudStorageAccount.SetConfigurationSettingPublisher(
|
||||||
|
(configName, configSetter) =>
|
||||||
|
configSetter(RoleEnvironment.GetConfigurationSettingValue(configName))
|
||||||
|
);
|
||||||
|
|
||||||
|
// For information on handling configuration changes
|
||||||
|
// see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
|
||||||
|
RoleEnvironment.Changing += (sender, e) => {
|
||||||
|
// If a configuration setting is changing
|
||||||
|
if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange)) {
|
||||||
|
// Set e.Cancel to true to restart this role instance
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
RegisterRoutes(RouteTable.Routes);
|
RegisterRoutes(RouteTable.Routes);
|
||||||
|
|
||||||
_host = OrchardStarter.CreateHost(MvcSingletons);
|
_host = OrchardStarter.CreateHost(MvcSingletons);
|
||||||
|
@@ -58,7 +58,7 @@
|
|||||||
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<Reference Include="NHibernate.ByteCode.Castle">
|
<Reference Include="NHibernate.ByteCode.Castle">
|
||||||
<HintPath>..\..\..\lib\fluentnhibernate\NHibernate.ByteCode.Castle.dll</HintPath>
|
<HintPath>..\..\..\lib\fluentnhibernate\NHibernate.ByteCode.Castle.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -144,7 +144,6 @@
|
|||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="WebRole.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Global.asax" />
|
<Content Include="Global.asax" />
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
using System.Linq;
|
|
||||||
using Microsoft.WindowsAzure;
|
|
||||||
using Microsoft.WindowsAzure.ServiceRuntime;
|
|
||||||
|
|
||||||
namespace Orchard.Azure.Web {
|
|
||||||
public class WebRole : RoleEntryPoint {
|
|
||||||
public override bool OnStart() {
|
|
||||||
CloudStorageAccount.SetConfigurationSettingPublisher(
|
|
||||||
(configName, configSetter) =>
|
|
||||||
configSetter(RoleEnvironment.GetConfigurationSettingValue(configName))
|
|
||||||
);
|
|
||||||
|
|
||||||
// For information on handling configuration changes
|
|
||||||
// see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
|
|
||||||
RoleEnvironment.Changing += RoleEnvironmentChanging;
|
|
||||||
|
|
||||||
return base.OnStart();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void RoleEnvironmentChanging(object sender, RoleEnvironmentChangingEventArgs e) {
|
|
||||||
// If a configuration setting is changing
|
|
||||||
if ( e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange) ) {
|
|
||||||
// Set e.Cancel to true to restart this role instance
|
|
||||||
e.Cancel = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -54,7 +54,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
Reference in New Issue
Block a user