Upgrading Orchard.Azure to Windows Azure SDK 2.1. Implementing dynamic inclusion of theme and module content via role content folders. Moving Orchard.Azure.Web startup task to Orchard.Azure.CloudService.

This commit is contained in:
DanielStolt
2013-08-14 21:48:28 +02:00
committed by Sebastien Ros
parent 3d7829ce0a
commit e094066194
5 changed files with 69 additions and 38 deletions

View File

@@ -103,23 +103,6 @@
<Delete Files="@(WebConfigs)" />
<!-- extra processing of the staged config files -->
<XmlUpdate XmlFileName="$(MsDeployFolder)\web.config"
XPath="/configuration/system.web/compilation/@debug"
Value="false" />
<XmlUpdate XmlFileName="$(MsDeployFolder)\Config\log4net.config"
XPath="/log4net/appender/immediateFlush/@value"
Value="false" />
<XmlUpdate XmlFileName="$(MsDeployFolder)\Config\log4net.config"
XPath="/log4net/logger/priority/@value"
Value="ERROR" />
<XmlUpdate XmlFileName="$(MsDeployFolder)\Config\log4net.config"
XPath="/log4net/root/priority/@value"
Value="ERROR" />
<Copy
SourceFiles="$(SrcFolder)\Orchard.Azure\Orchard.Azure.CloudService\ServiceConfiguration.cscfg"
DestinationFolder="$(StageFolder)"

View File

@@ -4,7 +4,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>2.0</ProductVersion>
<ProductVersion>2.1</ProductVersion>
<ProjectGuid>{03c5327d-4e8e-45a7-acd1-e18e7caa3c4a}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -46,15 +46,77 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Orchard.Azure.WebContent\" />
<Folder Include="Orchard.Azure.WebContent\Bin" />
<Folder Include="Orchard.Azure.WebContent\Bin\Startup\" />
<Folder Include="Profiles" />
</ItemGroup>
<ItemGroup>
<PublishProfile Include="Profiles\mip-cms-testProduction.azurePubxml" />
<Content Include="Orchard.Azure.WebContent\Bin\Startup\ConfigureIIS.cmd">
<SubType>Content</SubType>
</Content>
</ItemGroup>
<!-- Import the target files for this project template -->
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.0\</CloudExtensionsDir>
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.1\</CloudExtensionsDir>
</PropertyGroup>
<Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />
<!-- The BeforeAddRoleContent override ensures that content in themes and modules get added
to the Azure package. The web role project Orchard.Azure.Web contains assembly references
to all themes and modules, but won't contain their content unless those are somehow
included in the output. This target override includes all the appropriate content files
from underneath the regular Orchard.Web project folder. -->
<PropertyGroup>
<LibFolder>$(MSBuildProjectDirectory)\..\..\..\lib</LibFolder>
<SrcFolder>$(MSBuildProjectDirectory)\..\..</SrcFolder>
<StagingFolder>$(MSBuildProjectDirectory)\Staging</StagingFolder>
</PropertyGroup>
<Target Name="BeforeAddRoleContent">
<!-- Clean the staging area.-->
<RemoveDir Directories="$(StagingFolder)" ContinueOnError="true" />
<!-- Copy all additional content to the staging area. -->
<ItemGroup>
<!-- Exclude project/compilation artifacts. -->
<Excluded Include="$(SrcFolder)\**\bin\**\*;$(SrcFolder)\**\obj\**\*;$(SrcFolder)\**\*.user;$(SrcFolder)\**\*.cs;$(SrcFolder)\**\*.csproj;$(SrcFolder)\**\.hg\**\*" />
<Stage-Themes Include="$(SrcFolder)\Orchard.Web\Themes\**\*" Exclude="@(Excluded)" />
<Stage-Core Include="$(SrcFolder)\Orchard.Web\Core\**\*" Exclude="@(Excluded)" />
<Stage-Modules Include="$(SrcFolder)\Orchard.Web\Modules\**\*" Exclude="@(Excluded)" />
<SqlCeBinariesx86 Include="$(LibFolder)\sqlce\x86\**\*" />
<SqlCeBinariesx64 Include="$(LibFolder)\sqlce\amd64\**\*" />
</ItemGroup>
<Copy SourceFiles="@(Stage-Themes)" DestinationFolder="$(StagingFolder)\Themes\%(RecursiveDir)" />
<Copy SourceFiles="@(Stage-Core)" DestinationFolder="$(StagingFolder)\Core\%(RecursiveDir)" />
<Copy SourceFiles="@(Stage-Modules)" DestinationFolder="$(StagingFolder)\Modules\%(RecursiveDir)" />
<Copy SourceFiles="@(SqlCeBinariesx86)" DestinationFolder="$(StagingFolder)\SqlCe-x86\%(RecursiveDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(SqlCeBinariesx64)" DestinationFolder="$(StagingFolder)\SqlCe-x64\%(RecursiveDir)" SkipUnchangedFiles="true" />
<!-- Delete superfluous web.config files. -->
<ItemGroup>
<WebConfigFiles Include="$(StagingFolder)\Modules\*\web.config;$(StagingFolder)\Core\web.config" />
</ItemGroup>
<Delete Files="@(WebConfigFiles)" />
<!-- Include the folders in the packaged site content. -->
<ItemGroup>
<AzureRoleContent Include="$(StagingFolder)\Themes">
<RoleName>Orchard.Azure.Web</RoleName>
<Destination>..\sitesroot\0\Themes</Destination>
</AzureRoleContent>
<AzureRoleContent Include="$(StagingFolder)\Core">
<RoleName>Orchard.Azure.Web</RoleName>
<Destination>..\sitesroot\0\Core</Destination>
</AzureRoleContent>
<AzureRoleContent Include="$(StagingFolder)\Modules">
<RoleName>Orchard.Azure.Web</RoleName>
<Destination>..\sitesroot\0\Modules</Destination>
</AzureRoleContent>
<AzureRoleContent Include="$(StagingFolder)\SqlCe-x86">
<RoleName>Orchard.Azure.Web</RoleName>
<Destination>..\sitesroot\0\bin\x86</Destination>
</AzureRoleContent>
<AzureRoleContent Include="$(StagingFolder)\SqlCe-x64">
<RoleName>Orchard.Azure.Web</RoleName>
<Destination>..\sitesroot\0\bin\amd64</Destination>
</AzureRoleContent>
</ItemGroup>
</Target>
</Project>

View File

@@ -65,13 +65,11 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-10\ref\Microsoft.WindowsAzure.Configuration.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-10\ref\Microsoft.WindowsAzure.Diagnostics.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -170,11 +168,6 @@
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="Startup\ConfigureIIS.cmd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
@@ -189,9 +182,7 @@
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\..\Orchard.Web\Core\Orchard.Core.csproj">
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>

View File

@@ -42,7 +42,7 @@
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
name="AzureDiagnostics">
<filter type="" />
</add>

View File

@@ -1,5 +0,0 @@
REM Check if this task is running on the compute emulator, if not then sets the Idle Timeout to zero
IF "%ComputeEmulatorRunning%" == "false" (
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
)