mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -72,8 +72,6 @@
|
||||
|
||||
<!-- Packaging -->
|
||||
|
||||
<UsingTask AssemblyFile="$(MsBuildTasksFolder)\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.XmlDelete" />
|
||||
|
||||
<Target Name="Package-ForCloud">
|
||||
|
||||
<ItemGroup>
|
||||
@@ -113,24 +111,6 @@
|
||||
XPath="/log4net/root/priority/@value"
|
||||
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
|
||||
SourceFiles="$(SrcFolder)\Orchard.Azure\Orchard.Azure.CloudService\ServiceConfiguration.cscfg"
|
||||
DestinationFolder="$(StageFolder)"
|
||||
@@ -155,7 +135,7 @@
|
||||
<Target Name="Package-Stage">
|
||||
|
||||
<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)"
|
||||
/>
|
||||
|
||||
|
@@ -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"?>
|
||||
<configuration>
|
||||
<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>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
|
@@ -55,7 +55,7 @@
|
||||
<ItemGroup>
|
||||
<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.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">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\moq\Moq.dll</HintPath>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?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">
|
||||
<Instances count="1" />
|
||||
<ConfigurationSettings>
|
||||
|
@@ -1,11 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ServiceDefinition name="OrchardCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
|
||||
<WebRole name="Orchard.Azure.Web">
|
||||
<Sites>
|
||||
<Site name="Web">
|
||||
<Bindings>
|
||||
<Binding name="HttpIn" endpointName="HttpIn" />
|
||||
</Bindings>
|
||||
</Site>
|
||||
</Sites>
|
||||
<ConfigurationSettings>
|
||||
<Setting name="DataConnectionString" />
|
||||
</ConfigurationSettings>
|
||||
<InputEndpoints>
|
||||
<Endpoints>
|
||||
<InputEndpoint name="HttpIn" protocol="http" port="80" />
|
||||
</InputEndpoints>
|
||||
</Endpoints>
|
||||
</WebRole>
|
||||
</ServiceDefinition>
|
@@ -1,7 +1,10 @@
|
||||
using System.Web;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Autofac;
|
||||
using Microsoft.WindowsAzure;
|
||||
using Microsoft.WindowsAzure.ServiceRuntime;
|
||||
using Orchard.Environment;
|
||||
|
||||
namespace Orchard.Azure.Web {
|
||||
@@ -16,6 +19,21 @@ namespace Orchard.Azure.Web {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
_host = OrchardStarter.CreateHost(MvcSingletons);
|
||||
|
@@ -58,7 +58,7 @@
|
||||
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</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">
|
||||
<HintPath>..\..\..\lib\fluentnhibernate\NHibernate.ByteCode.Castle.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -144,7 +144,6 @@
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WebRole.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<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>
|
||||
<ItemGroup>
|
||||
<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.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
|
Reference in New Issue
Block a user