Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<PackageVersion Include="ExcelMapper" Version="6.0.641" />
<PackageVersion Include="MessagePack" Version="3.1.8" />
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.3.11" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.12" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.10" />
<PackageVersion Include="Microsoft.FeatureManagement.AspNetCore" Version="4.6.0" />
<PackageVersion Include="Microsoft.OpenApi" Version="2.11.0" />
Expand Down
41 changes: 41 additions & 0 deletions src/Build/Grand.Host.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<Project>

<!--
The business layer implementations, referenced by the hosts - and only by the hosts.

Nothing in the web layer links a type from these assemblies: the whole solution compiles
against the contracts in Grand.Business.Core. What these references are for is presence.
Each of the nine projects carries a Startup/StartupApplication.cs, and TypeSearcher finds
IStartupApplication by walking the assemblies loaded in the AppDomain
(Grand.Infrastructure/TypeSearch/TypeSearcher.cs). An implementation that is not referenced
by the host never reaches the host's output, is never loaded, and its services are never
registered.

So this list looks removable and is not. Dropping an entry costs an entire business area's
DI registration, and nothing fails at build time - the first sign is a resolution failure
on a request at runtime.

These belong to the host because the host is the composition root. They used to sit in
Grand.Web.Common, which meant the shared web layer - and through it every plugin, since
Grand.Plugin.props references it - compiled against the entire business layer for no
reason at all.

Private is left at its default: unlike a plugin, the host is exactly where these
assemblies are supposed to be copied.

Paths are anchored to this file so a host can sit at any depth.
-->

<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Business\Grand.Business.Authentication\Grand.Business.Authentication.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Business\Grand.Business.Catalog\Grand.Business.Catalog.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Business\Grand.Business.Checkout\Grand.Business.Checkout.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Business\Grand.Business.Cms\Grand.Business.Cms.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Business\Grand.Business.Common\Grand.Business.Common.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Business\Grand.Business.Customers\Grand.Business.Customers.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Business\Grand.Business.Marketing\Grand.Business.Marketing.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Business\Grand.Business.Messages\Grand.Business.Messages.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Business\Grand.Business.Storage\Grand.Business.Storage.csproj" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/Web/Grand.Web.Admin/Grand.Web.Admin.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\Build\Grand.Common.props" />
<Import Project="..\..\Build\Grand.Host.props" />
<PropertyGroup>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<ServerGarbageCollection>true</ServerGarbageCollection>
Expand Down
11 changes: 11 additions & 0 deletions src/Web/Grand.Web.AdminShared/Grand.Web.AdminShared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,16 @@
Microsoft.AspNetCore.Http 2.1.1 has a known high severity advisory (GHSA-hxrm-9w7p-39cc).
This reference lifts it to a patched 2.x. Remove only together with elFinder. -->
<PackageReference Include="Microsoft.AspNetCore.Http" />
<!-- Same story, same package graph. elFinder.Net.Core 1.5.0 brings Newtonsoft.Json 11.0.2
(GHSA-5crp-9r3c-p9vr) and SixLabors.ImageSharp 2.0.0 (GHSA-2cmq-823j-5qj8 and six more),
and neither is used from this project's code.

Until Grand.Web.Common referenced the whole business layer, these floors arrived by
accident: Scryber.Core and the rest of that graph outvoted elFinder and the versions
below are exactly what resolved then. Moving those references to the hosts, where they
belong, took the accident away and the vulnerable versions surfaced - so the floor is
stated here on purpose. Remove only together with elFinder. -->
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="SixLabors.ImageSharp" />
</ItemGroup>
</Project>
13 changes: 0 additions & 13 deletions src/Web/Grand.Web.Common/Grand.Web.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,5 @@
<ProjectReference Include="..\..\Core\Grand.Infrastructure\Grand.Infrastructure.csproj" />
<ProjectReference Include="..\..\Core\Grand.SharedKernel\Grand.SharedKernel.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Business\Grand.Business.Authentication\Grand.Business.Authentication.csproj" />
<ProjectReference Include="..\..\Business\Grand.Business.Catalog\Grand.Business.Catalog.csproj" />
<ProjectReference Include="..\..\Business\Grand.Business.Checkout\Grand.Business.Checkout.csproj" />
<ProjectReference Include="..\..\Business\Grand.Business.Cms\Grand.Business.Cms.csproj" />
<ProjectReference Include="..\..\Business\Grand.Business.Common\Grand.Business.Common.csproj" />
<ProjectReference Include="..\..\Business\Grand.Business.Customers\Grand.Business.Customers.csproj" />
<ProjectReference Include="..\..\Business\Grand.Business.Marketing\Grand.Business.Marketing.csproj" />
<ProjectReference Include="..\..\Business\Grand.Business.Messages\Grand.Business.Messages.csproj" />
<ProjectReference Include="..\..\Business\Grand.Business.Storage\Grand.Business.Storage.csproj" />
</ItemGroup>


</Project>
1 change: 1 addition & 0 deletions src/Web/Grand.Web.Store/Grand.Web.Store.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<Import Project="..\..\Build\Grand.Common.props" />
<Import Project="..\..\Build\Grand.Host.props" />
<PropertyGroup>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<ServerGarbageCollection>true</ServerGarbageCollection>
Expand Down
1 change: 1 addition & 0 deletions src/Web/Grand.Web.Vendor/Grand.Web.Vendor.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\Build\Grand.Common.props" />
<Import Project="..\..\Build\Grand.Host.props" />
<PropertyGroup>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<ServerGarbageCollection>false</ServerGarbageCollection>
Expand Down
1 change: 1 addition & 0 deletions src/Web/Grand.Web/Grand.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\Build\Grand.Common.props" />
<Import Project="..\..\Build\Grand.Host.props" />
<PropertyGroup>
<!--The common language runtime (CLR) supports two types of garbage collection:
workstation garbage collection, which is available on all systems, and server garbage collection,
Expand Down
Loading