Reverting changes on Orchard.proj for Kudu

Fixes #5557
This commit is contained in:
Sebastien Ros 2015-07-22 14:50:14 -07:00
parent 8032d202e3
commit 894d932210

View File

@ -18,10 +18,10 @@
<ThemesSrcFolder>$(MSBuildProjectDirectory)\src\Orchard.Web\Themes</ThemesSrcFolder>
<CompileFolder>$(BuildFolder)\Compile</CompileFolder>
<PrecompiledFolder>$(BuildFolder)\Precompiled</PrecompiledFolder>
<WebSitesFolder>$(CompileFolder)\_PublishedWebsites</WebSitesFolder>
<StageFolder>$(BuildFolder)\Stage</StageFolder>
<MsDeployFolder>$(BuildFolder)\MsDeploy</MsDeployFolder>
<PrecompiledFolder>$(BuildFolder)\Precompiled</PrecompiledFolder>
<ProfilingFolder>$(BuildFolder)\Profiling</ProfilingFolder>
<GalleryFolder>$(BuildFolder)\Gallery</GalleryFolder>
@ -75,6 +75,7 @@
<Target Name="Precompiled">
<CallTarget Targets="Clean"/>
<CallTarget Targets="Compile"/>
<CallTarget Targets="Package-Stage"/>
<CallTarget Targets="Package-Precompiled"/>
</Target>
@ -115,6 +116,10 @@
Projects="$(SrcFolder)\Orchard.sln"
Targets="Build"
Properties="Configuration=Release;OutputPath=$(CompileFolder)" />
<!-- Compile to "regular" output folder for devs using VS locally -->
<MSBuild
Projects="$(SrcFolder)\Orchard.sln"
Targets="Build"/>
</Target>
<Target Name ="CompileMsBuildTasks">
@ -160,11 +165,6 @@
</ItemGroup>
<Copy SourceFiles="@(NUnitAddinFiles)" DestinationFolder="$(LibFolder)\nunit\addins" />
<!-- The Spec tests require the local project to be built and so that /bin exists -->
<MSBuild
Projects="$(SrcFolder)\Orchard.sln"
Targets="Build"/>
<CreateItem Include="$(CompileFolder)\*.Specs.dll">
<Output TaskParameter="Include" ItemName="SpecAssemblies" />
</CreateItem>
@ -195,15 +195,43 @@
<Stage-Media Include="$(SrcFolder)\Orchard.Web\Media\OrchardLogo.png" />
<Stage-PoFiles Include="$(SrcFolder)\Orchard.Web\**\*.po" />
<Stage-Core Include="$(WebSitesFolder)\Orchard.Core\**\*" Exclude="$(WebSitesFolder)\Orchard.Core\**\bin\**\*" />
<Stage-Themes Include="$(ThemesSrcFolder)\**\*" Exclude="@(Stage-Bin-Exclude);$(ThemesSrcFolder)\*.*;$(ThemesSrcFolder)\*.*;$(ThemesSrcFolder)\bin\**;$(ThemesSrcFolder)\obj\**;$(ThemesSrcFolder)\*.*;$(ThemesSrcFolder)\Properties\**" />
<Stage-Themes-Binaries Include="$(ThemesSrcFolder)\*\**\bin\*" />
<Stage-Module-Exclude Include="@(Stage-Web);@(Stage-Core);@(Stage-Themes);$(WebSitesFolder)\Themes\**\*;$(WebSitesFolder)\PackageIndexReferenceImplementation\**\*"/>
<Stage-Modules Include="$(WebSitesFolder)\**\*" Exclude="@(Stage-Bin-Exclude);@(Stage-Module-Exclude)" />
<Stage-Modules-Binaries Include="$(WebSitesFolder)\**\bin\**\*" Exclude="@(Stage-Module-Exclude)"/>
<Stage-Modules-Sources Include="$(ModulesSrcFolder)\**\*.csproj;$(ModulesSrcFolder)\**\*.cs"/>
<!-- Get list of module names from the module definition files within ModulesSrcFolder -->
<Stage-Modules-Definitions Include="$(ModulesSrcFolder)\**\Module.txt" />
<Stage-Modules-Directories Include="@(Stage-Modules-Definitions->DirectoryName())" />
<Stage-Modules-Names Include="@(Stage-Modules-Directories->'%(Filename)%(Extension)')" />
<!-- Get list of theme names from the theme definition files within ThemesSrcFolder -->
<Stage-Themes-Definitions Include="$(ThemesSrcFolder)\**\Theme.txt" />
<Stage-Themes-Directories Include="@(Stage-Themes-Definitions->DirectoryName())" />
<Stage-Themes-Names Include="@(Stage-Themes-Directories->'%(Filename)%(Extension)')" />
<Stage-License Include="$(MSBuildProjectDirectory)\*.txt" />
<Stage-Build Include="$(MSBuildProjectDirectory)\*.proj;$(MSBuildProjectDirectory)\*.cmd" />
</ItemGroup>
<ItemGroup>
<!-- Note. We could add recursion (\..\) before the module/theme name thus avoiding the need for custom metadata
and simplifing the copy tasks further below. However this can result in folders being incorrectly copied if
a module or theme contains a subfolder with the same name as another module or theme. -->
<Stage-Modules Include="$(WebSitesFolder)\%(Stage-Modules-Names.Identity)\**\*" Exclude="@(Stage-Bin-Exclude)">
<ModuleName>%(Stage-Modules-Names.Identity)</ModuleName>
</Stage-Modules>
<Stage-Modules-Binaries Include="$(WebSitesFolder)\%(Stage-Modules-Names.Identity)\**\bin\**\*">
<ModuleName>%(Stage-Modules-Names.Identity)</ModuleName>
</Stage-Modules-Binaries>
<Stage-Modules-Sources Include="$(ModulesSrcFolder)\**\*.csproj;$(ModulesSrcFolder)\**\*.cs"/>
<Stage-Themes-Default Include="$(WebSitesFolder)\Themes\%(Stage-Themes-Names.Identity)\**\*">
<ThemeName>%(Stage-Themes-Names.Identity)</ThemeName>
</Stage-Themes-Default>
<Stage-Themes-Custom Include="$(WebSitesFolder)\%(Stage-Themes-Names.Identity)\**\*" Exclude="@(Stage-Bin-Exclude)">
<ThemeName>%(Stage-Themes-Names.Identity)</ThemeName>
</Stage-Themes-Custom>
<!-- Note. Binaries are not copied for themes in the default Themes project. -->
<Stage-Themes-Binaries Include="$(WebSitesFolder)\%(Stage-Themes-Names.Identity)\**\bin\**\*">
<ThemeName>%(Stage-Themes-Names.Identity)</ThemeName>
</Stage-Themes-Binaries>
<Stage-Themes-Sources Include="$(ThemesSrcFolder)\**\*.csproj;$(ThemesSrcFolder)\**\*.cs" Exclude="$(ThemesSrcFolder)\*.*"/>
</ItemGroup>
<!-- Copying module binaries is somewhat tricky: From a module "bin" directory, we
@ -231,15 +259,17 @@
<Copy SourceFiles="@(SqlCe-Native-Binaries-x86)" DestinationFolder="$(StageFolder)\bin\x86\%(RecursiveDir)"/>
<Copy SourceFiles="@(SqlCe-Native-Binaries-amd64)" DestinationFolder="$(StageFolder)\bin\amd64\%(RecursiveDir)"/>
<Copy SourceFiles="@(Stage-Core)" DestinationFolder="$(StageFolder)\Core\%(RecursiveDir)"/>
<Copy SourceFiles="@(Stage-Modules)" DestinationFolder="$(StageFolder)\Modules\%(RecursiveDir)"/>
<Copy SourceFiles="@(Stage-Modules)" DestinationFiles="@(Stage-Modules->'$(StageFolder)\Modules\%(ModuleName)\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(Stage-Modules-Binaries-Unique)" DestinationFiles="@(Stage-Modules-Binaries-Unique->'$(StageFolder)\Modules\%(ModuleName)\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(Stage-Modules-Sources)" DestinationFolder="$(StageFolder)\Modules\%(RecursiveDir)"/>
<Copy SourceFiles="@(Stage-Modules-Binaries-Unique)" DestinationFolder="$(StageFolder)\Modules\%(RecursiveDir)"/>
<Copy SourceFiles="@(Stage-Themes)" DestinationFolder="$(StageFolder)\Themes\%(RecursiveDir)"/>
<Copy SourceFiles="@(Stage-Themes-Binaries-Unique)" DestinationFolder="$(StageFolder)\Themes\%(RecursiveDir)"/>
<Copy SourceFiles="@(Stage-Themes-Default)" DestinationFiles="@(Stage-Themes-Default->'$(StageFolder)\Themes\%(ThemeName)\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(Stage-Themes-Custom)" DestinationFiles="@(Stage-Themes-Custom->'$(StageFolder)\Themes\%(ThemeName)\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(Stage-Themes-Binaries-Unique)" DestinationFiles="@(Stage-Themes-Binaries-Unique->'$(StageFolder)\Themes\%(ThemeName)\%(RecursiveDir)%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(Stage-Themes-Sources)" DestinationFolder="$(StageFolder)\Themes\%(RecursiveDir)"/>
<MakeDir Directories="$(StageFolder)\App_Data"/>
<WriteLinesToFile File="$(StageFolder)\App_Data\_marker.txt" Lines="some_text" Overwrite="true"/>
<!-- extra processing of the staged config files -->
<TransformXml
Source="$(StageFolder)\Web.Config"
@ -290,89 +320,16 @@
<!-- Packaging (Precompiled) -->
<Target Name="Package-Precompiled">
<CallTarget Targets="CompileMsBuildTasks"/>
<CallTarget Targets="ValidateProjectFiles"/>
<ItemGroup>
<Stage-Exclude-Source Include="$(WebSitesFolder)\**\*.cs;$(WebSitesFolder)\**\*.csproj;" />
<SqlCe-Native-Binaries-x86 Include="$(SqlCeFolder)\x86\**\*"/>
<SqlCe-Native-Binaries-amd64 Include="$(SqlCeFolder)\amd64\**\*"/>
<Stage-Orchard-Web-Bins Include="$(WebSitesFolder)\Orchard.Web\bin\*"/>
<Stage-Bin-Exclude Include="$(WebSitesFolder)\**\bin\**\*" />
<Stage-Web Include="$(WebSitesFolder)\Orchard.Web\**\*" Exclude="$(SrcFolder)\Orchard.Web\**\*.Release.config;$(SrcFolder)\Orchard.Web\**\*.Debug.config;$(Stage-Exclude-Source)"/>
<Stage-Web-Config Include="$(SrcFolder)\Orchard.Web\**\*.config" Exclude="$(SrcFolder)\Orchard.Web\**\*.Release.config;$(SrcFolder)\Orchard.Web\**\*.Debug.config"/>
<Stage-Media Include="$(SrcFolder)\Orchard.Web\Media\OrchardLogo.png" />
<Stage-PoFiles Include="$(SrcFolder)\Orchard.Web\**\*.po" />
<Stage-Core Include="$(WebSitesFolder)\Orchard.Core\**\*" Exclude="$(WebSitesFolder)\Orchard.Core\**\bin\**\*;$(Stage-Exclude-Source)" />
<Stage-Themes Include="$(ThemesSrcFolder)\**\*" Exclude="@(Stage-Bin-Exclude);$(ThemesSrcFolder)\*.*;$(ThemesSrcFolder)\*.*;$(ThemesSrcFolder)\bin\**;$(ThemesSrcFolder)\obj\**;$(ThemesSrcFolder)\*.*;$(ThemesSrcFolder)\Properties\**;$(Stage-Exclude-Source)" />
<Stage-Themes-Binaries Include="$(ThemesSrcFolder)\*\**\bin\*" />
<Stage-Module-Exclude Include="@(Stage-Web);@(Stage-Core);@(Stage-Themes);$(WebSitesFolder)\Themes\**\*;$(WebSitesFolder)\PackageIndexReferenceImplementation\**\*;$(Stage-Exclude-Source)"/>
<Stage-Modules Include="$(WebSitesFolder)\**\*" Exclude="@(Stage-Bin-Exclude);@(Stage-Module-Exclude);" />
<Stage-Modules-Binaries Include="$(WebSitesFolder)\**\bin\**\*" Exclude="@(Stage-Module-Exclude)"/>
<Stage-License Include="$(MSBuildProjectDirectory)\*.txt" />
<Precompiled-Exclude-Source Include="$(StageFolder)\**\*.cs;$(StageFolder)\**\*.csproj;$(StageFolder)\**\*.csproj.user" />
<Precompiled-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.xml;$(StageFolder)\Modules\**\Tests\**;$(StageFolder)\Modules\**\Specs\**;$(StageFolder)\**\obj\**\*;@(Precompiled-Exclude-Source)" />
</ItemGroup>
<!-- Copying module binaries is somewhat tricky: From a module "bin" directory, we
only want to include the files that are _not_ already present in
the "Orchard.Web\Bin" folder. -->
<FilterModuleBinaries
ModulesBinaries="@(Stage-Modules-Binaries)"
OrchardWebBinaries="@(Stage-Orchard-Web-Bins)">
<Output TaskParameter="ExcludedBinaries" ItemName="FilterModuleBinaries-ExcludedBinaries"/>
</FilterModuleBinaries>
<FilterModuleBinaries
ModulesBinaries="@(Stage-Themes-Binaries)"
OrchardWebBinaries="@(Stage-Orchard-Web-Bins)">
<Output TaskParameter="ExcludedBinaries" ItemName="FilterThemeBinaries-ExcludedBinariesFromThemes"/>
</FilterModuleBinaries>
<ItemGroup>
<Stage-Modules-Binaries-Unique Include="@(Stage-Modules-Binaries)" Exclude="@(FilterModuleBinaries-ExcludedBinaries)"/>
<Stage-Themes-Binaries-Unique Include="@(Stage-Themes-Binaries)" Exclude="@(FilterThemeBinaries-ExcludedBinariesFromThemes)"/>
</ItemGroup>
<Copy SourceFiles="@(Stage-Web);@(Stage-Web-Config);@(Stage-License)" DestinationFolder="$(PrecompiledFolder)\%(RecursiveDir)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(Stage-Media)" DestinationFolder="$(PrecompiledFolder)\Media" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(Stage-PoFiles)" DestinationFolder="$(PrecompiledFolder)\%(RecursiveDir)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(SqlCe-Native-Binaries-x86)" DestinationFolder="$(PrecompiledFolder)\bin\x86\%(RecursiveDir)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(SqlCe-Native-Binaries-amd64)" DestinationFolder="$(PrecompiledFolder)\bin\amd64\%(RecursiveDir)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(Stage-Core)" DestinationFolder="$(PrecompiledFolder)\Core\%(RecursiveDir)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(Stage-Modules)" DestinationFolder="$(PrecompiledFolder)\Modules\%(RecursiveDir)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(Stage-Modules-Binaries-Unique)" DestinationFolder="$(PrecompiledFolder)\Modules\%(RecursiveDir)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(Stage-Themes)" DestinationFolder="$(PrecompiledFolder)\Themes\%(RecursiveDir)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(Stage-Themes-Binaries-Unique)" DestinationFolder="$(PrecompiledFolder)\Themes\%(RecursiveDir)" SkipUnchangedFiles="true"/>
<MakeDir Directories="$(PrecompiledFolder)\App_Data"/>
<WriteLinesToFile File="$(PrecompiledFolder)\App_Data\_marker.txt" Lines="some_text" Overwrite="true"/>
<MakeDir Directories="$(PrecompiledFolder)\bin\HostRestart"/>
<!-- extra processing of the staged config files -->
<TransformXml
Source="$(PrecompiledFolder)\Web.Config"
Transform="$(SrcFolder)\Orchard.Web\Web.Release.Config"
Destination="$(PrecompiledFolder)\Web.Config"
/>
<TransformXml
Source="$(PrecompiledFolder)\Config\HostComponents.Config"
Transform="$(SrcFolder)\Orchard.Web\Config\HostComponents.Release.Config"
Destination="$(PrecompiledFolder)\Config\HostComponents.Config"
/>
<TransformXml
Source="$(PrecompiledFolder)\Config\log4net.Config"
Transform="$(SrcFolder)\Orchard.Web\Config\log4net.Release.Config"
Destination="$(PrecompiledFolder)\Config\log4net.Config"
/>
<!-- move over extra non-content files the csproj referenced -->
<Copy SourceFiles="@(StageProjectAlteration-ExtraFiles->'$(SrcFolder)\Orchard.Web\%(Identity)')"
<Copy SourceFiles="@(Precompiled-Folder-Input)"
DestinationFolder="$(PrecompiledFolder)\%(RecursiveDir)"/>
<MakeDir Directories="$(PrecompiledFolder)\bin\HostRestart"/>
</Target>
<Target Name="Package-Zip">
<ItemGroup>