Orchard.proj: Factoring out a part of the Compile target into the DevCompile target and removing BuildViews target

- For a simple local build (just to validate that the solution builds), we don't actually need that second build that copies files to the output folder.
- CI builds (Test, Spec, etc.) that operate on the build output folder are unaffected, because Compile calls DevCompile
- The BuildViews target is not really necessary, just call any other target (Compile, DevCompile, Spec, etc.) with "/p:MvcBuildViews=true"
This commit is contained in:
Benedek Farkas
2024-03-25 14:03:13 +01:00
parent 3b833ad7bf
commit 4753ba9067

View File

@@ -126,20 +126,17 @@
</Target>
<Target Name="Compile">
<CallTarget Targets="DevCompile"/>
<!-- Compile to "OutputFolder" -->
<MSBuild
Projects="$(Solution)"
Targets="Build"
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder);MvcBuildViews=false" />
<!-- Compile to "regular" output folder for devs using VS locally -->
<MSBuild
Projects="$(Solution)"
Targets="Build"
Properties="Configuration=$(Configuration);MvcBuildViews=$(MvcBuildViews)" />
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder)" />
</Target>
<Target Name="BuildViews">
<!-- To make sure that Roslyn tools are available, even if the Compile task was not called before this. -->
<Target Name="DevCompile">
<!-- To make sure that Roslyn tools are available, since it's included with Orchard.Web, which is not referenced by
other projects, so it will be built towards the end. -->
<MSBuild
Projects="$(OrchardWebFolder)\Orchard.Web.csproj"
Targets="CopyRoslynCompilerFilesToOutputDirectory" />
@@ -147,7 +144,7 @@
<MSBuild
Projects="$(Solution)"
Targets="Build"
Properties="Configuration=$(Configuration);MvcBuildViews=true" />
Properties="Configuration=$(Configuration);MvcBuildViews=$(MvcBuildViews)" />
</Target>
<Target Name="CompileMsBuildTasks">