Feature: Build static assets conditionally for Backoffice and Login (#17527)

* feat: conditionally install and build the 'login' and 'backoffice' targets depending on source files

* feat: remove the preconditions target, because we are now compiling a file list to check if we need to build

* feat: remove the 'clean' targets, because the project will be cleaned if any of the compiled file lists do not exist

* feat: remove the preserve.* files as they are no longer needed

* Enable default content items again

* Remove package.json from restore target inputs

* Include generated files as static assets after build

* Clean up project files

* Exclude CS0618 warning as error and fix CA2264

* Exclude CS0612 warning as error

* Suppress removal of test fixture

* Use separate property/item groups for backoffice and login project

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
This commit is contained in:
Jacob Overgaard
2024-11-19 13:29:39 +01:00
committed by GitHub
parent 0f86cad8fa
commit 07b7c26fd9
28 changed files with 422 additions and 298 deletions

4
.gitignore vendored
View File

@@ -47,10 +47,6 @@ NDependOut/
QueryResult.htm QueryResult.htm
tools/docfx/ tools/docfx/
# Ignore rule for clearing out Belle (avoid rebuilding all the time)
preserve.bellissima
preserve.login
# csharp-docs # csharp-docs
/build/csharp-docs/api/ /build/csharp-docs/api/
/build/csharp-docs/_site/ /build/csharp-docs/_site/

View File

@@ -15,14 +15,20 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors> <WarningsAsErrors>nullable</WarningsAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- TODO: [NU5104] Warning As Error: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency -->
<NoWarn>$(NoWarn);NU5104</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU5104</WarningsNotAsErrors>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject> <WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<!--
TODO: Fix and remove overrides:
[NU5104] Warning As Error: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency
-->
<NoWarn>$(NoWarn),NU5104</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors),NU5104</WarningsNotAsErrors>
</PropertyGroup>
<!-- SourceLink --> <!-- SourceLink -->
<PropertyGroup> <PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl> <PublishRepositoryUrl>true</PublishRepositoryUrl>

View File

@@ -3,6 +3,7 @@
<PropertyGroup> <PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup> </PropertyGroup>
<!-- Global packages (private, build-time packages for all projects) --> <!-- Global packages (private, build-time packages for all projects) -->
<ItemGroup> <ItemGroup>
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" /> <GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" />
@@ -10,6 +11,7 @@
<GlobalPackageReference Include="Umbraco.Code" Version="2.2.0" /> <GlobalPackageReference Include="Umbraco.Code" Version="2.2.0" />
<GlobalPackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" /> <GlobalPackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" />
</ItemGroup> </ItemGroup>
<!-- Microsoft packages --> <!-- Microsoft packages -->
<ItemGroup> <ItemGroup>
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.0" /> <PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.0" />
@@ -35,11 +37,13 @@
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.0" /> <PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Hybrid" Version="9.0.0-preview.9.24556.5" /> <PackageVersion Include="Microsoft.Extensions.Caching.Hybrid" Version="9.0.0-preview.9.24556.5" />
</ItemGroup> </ItemGroup>
<!-- Umbraco packages --> <!-- Umbraco packages -->
<ItemGroup> <ItemGroup>
<PackageVersion Include="Umbraco.JsonSchema.Extensions" Version="0.3.0" /> <PackageVersion Include="Umbraco.JsonSchema.Extensions" Version="0.3.0" />
<PackageVersion Include="Umbraco.CSharpTest.Net.Collections" Version="15.0.0" /> <PackageVersion Include="Umbraco.CSharpTest.Net.Collections" Version="15.0.0" />
</ItemGroup> </ItemGroup>
<!-- Third-party packages --> <!-- Third-party packages -->
<ItemGroup> <ItemGroup>
<PackageVersion Include="Asp.Versioning.Mvc" Version="8.1.0" /> <PackageVersion Include="Asp.Versioning.Mvc" Version="8.1.0" />
@@ -77,25 +81,26 @@
<PackageVersion Include="SixLabors.ImageSharp.Web" Version="3.1.3" /> <PackageVersion Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="7.0.0" /> <PackageVersion Include="Swashbuckle.AspNetCore" Version="7.0.0" />
</ItemGroup> </ItemGroup>
<!-- Transitive pinned versions (only required because our direct dependencies have vulnerable versions of transitive dependencies) --> <!-- Transitive pinned versions (only required because our direct dependencies have vulnerable versions of transitive dependencies) -->
<ItemGroup> <ItemGroup>
<!-- Both Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer bring in a vulnerable version of Azure.Identity --> <!-- Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer brings in a vulnerable version of Azure.Identity -->
<PackageVersion Include="Azure.Identity" Version="1.13.1" /> <PackageVersion Include="Azure.Identity" Version="1.13.1" />
<!-- Both Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer bring in a vulnerable version of Azure.Identity --> <!-- Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of System.Runtime.Caching -->
<PackageVersion Include="System.Runtime.Caching" Version="9.0.0" /> <PackageVersion Include="System.Runtime.Caching" Version="9.0.0" />
<!-- Dazinator.Extensions.FileProviders brings in a vulnerable version of System.Net.Http --> <!-- Dazinator.Extensions.FileProviders brings in a vulnerable version of System.Net.Http -->
<PackageVersion Include="System.Net.Http" Version="4.3.4" /> <PackageVersion Include="System.Net.Http" Version="4.3.4" />
<!-- Examine brings in a vulnerable version of System.Security.Cryptography.Xml --> <!-- Examine brings in a vulnerable version of System.Security.Cryptography.Xml -->
<PackageVersion Include="System.Security.Cryptography.Xml" Version="9.0.0" /> <PackageVersion Include="System.Security.Cryptography.Xml" Version="9.0.0" />
<!-- Both Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc bring in a vulnerable version of System.Text.RegularExpressions --> <!-- Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc brings in a vulnerable version of System.Text.RegularExpressions -->
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" /> <PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens --> <!-- OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.0" /> <PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.0" />
<!-- Both Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer, Dazinator.Extensions.FileProviders bring in legacy versions of System.Text.Encodings.Web --> <!-- Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer and Dazinator.Extensions.FileProviders brings in a legacy version of System.Text.Encodings.Web -->
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.0" /> <PackageVersion Include="System.Text.Encodings.Web" Version="9.0.0" />
<!-- NPoco.SqlServer bring in vulnerable version of Microsoft.Data.SqlClient --> <!-- NPoco.SqlServer brings in a vulnerable version of Microsoft.Data.SqlClient -->
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" /> <PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<!-- Examine.Lucene bring in a vulnerable version of Lucene.Net.Replicator --> <!-- Examine.Lucene brings in a vulnerable version of Lucene.Net.Replicator -->
<PackageVersion Include="Lucene.Net.Replicator" Version="4.8.0-beta00017" /> <PackageVersion Include="Lucene.Net.Replicator" Version="4.8.0-beta00017" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -3,6 +3,7 @@
<Title>Umbraco CMS - API Common</Title> <Title>Umbraco CMS - API Common</Title>
<Description>Contains the bits and pieces that are shared between the Umbraco CMS APIs.</Description> <Description>Contains the bits and pieces that are shared between the Umbraco CMS APIs.</Description>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" /> <FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup> </ItemGroup>
@@ -13,14 +14,15 @@
<PackageReference Include="Swashbuckle.AspNetCore" /> <PackageReference Include="Swashbuckle.AspNetCore" />
<PackageReference Include="OpenIddict.Abstractions" /> <PackageReference Include="OpenIddict.Abstractions" />
<PackageReference Include="OpenIddict.AspNetCore" /> <PackageReference Include="OpenIddict.AspNetCore" />
</ItemGroup>
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens --> <ItemGroup>
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens"/> <!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore depends on a vulnerable version -->
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" /> <ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" /> <ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -3,20 +3,21 @@
<Title>Umbraco CMS - Delivery API</Title> <Title>Umbraco CMS - Delivery API</Title>
<Description>Contains the presentation layer for the Umbraco CMS Delivery API.</Description> <Description>Contains the presentation layer for the Umbraco CMS Delivery API.</Description>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: [ASP0019] use IHeaderDictionary.Append or the indexer to append or set headers, <!--
and remove this override --> TODO: Fix and remove overrides:
<WarningsNotAsErrors>ASP0019</WarningsNotAsErrors> [ASP0019] use IHeaderDictionary.Append or the indexer to append or set headers
[CS0618/CS0612] update obsolete references
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),ASP0019,CS0618,CS0612</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Cms.Api.Common\Umbraco.Cms.Api.Common.csproj" /> <ProjectReference Include="..\Umbraco.Cms.Api.Common\Umbraco.Cms.Api.Common.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" /> <ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup> </ItemGroup>
<PropertyGroup>
<!-- TODO: Fix all warnings and remove this override -->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo"> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1> <_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>

View File

@@ -2,22 +2,27 @@
<PropertyGroup> <PropertyGroup>
<Title>Umbraco CMS - Management API</Title> <Title>Umbraco CMS - Management API</Title>
<Description>Contains the presentation layer for the Umbraco CMS Management API.</Description> <Description>Contains the presentation layer for the Umbraco CMS Management API.</Description>
<IsPackable>true</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
<AssemblyName>Umbraco.Cms.Api.Management</AssemblyName>
<RootNamespace>Umbraco.Cms.Api.Management</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix [SA1117] params all on same line, [SA1401] make fields private, <!--
[SA1134] own line attributes, [CS0108] hidden inherited member, [CS0618]/[CS9042] update TODO: Fix and remove overrides:
obsolete references, [CS1998] remove async or make method synchronous, [CS8524] switch statement, [SA1117] params all on same line
[IDE0060] removed unused parameter, [SA1649] file name match type, [CS0419] ambiguous reference, [SA1401] make fields private
[CS1573] param tag for all parameters, [CS1574] unresolveable cref, and remove overrides --> [SA1134] own line attributes
<WarningsNotAsErrors> [CS0108] hidden inherited member
SA1117,SA1401,SA1134,CS0108,CS0618,CS1998,CS8524,CS9042,IDE0060,SA1649,CS0419, [CS0618]/[CS9042] update obsolete references
CS1573,CS1574 [CS1998] remove async or make method synchronous
</WarningsNotAsErrors> [CS8524] switch statement
[IDE0060] removed unused parameter
[SA1649] file name match type
[CS0419] ambiguous reference
[CS1573] param tag for all parameters
[CS1574] unresolveable cref
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SA1117,SA1401,SA1134,CS0108,CS0618,CS9042,CS1998,CS8524,IDE0060,SA1649,CS0419,CS1573,CS1574</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="JsonPatch.Net" /> <PackageReference Include="JsonPatch.Net" />
<PackageReference Include="Swashbuckle.AspNetCore" /> <PackageReference Include="Swashbuckle.AspNetCore" />
@@ -41,8 +46,4 @@
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="OpenApi.json" /> <EmbeddedResource Include="OpenApi.json" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Remove="Security\Authorization\Dictionary\IDictionaryPermissionAuthorizer.cs" />
</ItemGroup>
</Project> </Project>

View File

@@ -3,17 +3,18 @@
<Title>Umbraco CMS - Persistence - Entity Framework Core - SQL Server migrations</Title> <Title>Umbraco CMS - Persistence - Entity Framework Core - SQL Server migrations</Title>
<Description>Adds support for Entity Framework Core SQL Server migrations to Umbraco CMS.</Description> <Description>Adds support for Entity Framework Core SQL Server migrations to Umbraco CMS.</Description>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version --> <!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageReference Include="Azure.Identity" /> <PackageReference Include="Azure.Identity" />
<!-- Take top-level depedendency on System.Runtime.Caching, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version --> <!-- Take top-level depedendency on System.Runtime.Caching, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageReference Include="System.Runtime.Caching" /> <PackageReference Include="System.Runtime.Caching" />
<!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, NPoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" /> <PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -3,24 +3,30 @@
<Title>Umbraco CMS - Persistence - Entity Framework Core</Title> <Title>Umbraco CMS - Persistence - Entity Framework Core</Title>
<Description>Adds support for Entity Framework Core to Umbraco CMS.</Description> <Description>Adds support for Entity Framework Core to Umbraco CMS.</Description>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<!-- TODO: [IDE0270] Simplify null checks, [CS0108] resolve hiding inherited members, [CS1998]
remove async or make method synchronous, and remove these overrides -->
<WarningsNotAsErrors>IDE0270,CS0108,CS1998</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<!--
TODO: Fix and remove overrides:
[IDE0270] Simplify null checks
[CS0108] resolve hiding inherited members
[CS1998] remove async or make method synchronous
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),IDE0270,CS0108,CS1998</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" /> <PackageReference Include="OpenIddict.EntityFrameworkCore" />
</ItemGroup>
<ItemGroup>
<!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version --> <!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageReference Include="Azure.Identity" /> <PackageReference Include="Azure.Identity" />
<!-- Take top-level depedendency on System.Runtime.Caching, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version --> <!-- Take top-level depedendency on System.Runtime.Caching, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageReference Include="System.Runtime.Caching" /> <PackageReference Include="System.Runtime.Caching" />
<!-- Take top-level depedendency on System.Text.Encodings.Web, because Microsoft.EntityFrameworkCore.SqlServer brings in a legacy version -->
<!-- Both Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer, Dazinator.Extensions.FileProviders bring in legacy versions of System.Text.Encodings.Web --> <PackageReference Include="System.Text.Encodings.Web" />
<PackageReference Include="System.Text.Encodings.Web"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -3,30 +3,39 @@
<Title>Umbraco CMS - Persistence - SQL Server</Title> <Title>Umbraco CMS - Persistence - SQL Server</Title>
<Description>Adds support for SQL Server to Umbraco CMS.</Description> <Description>Adds support for SQL Server to Umbraco CMS.</Description>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: [SA1405] Debug assret message text, [SA1121] resolve hiding inherited members, [SA1117] remove <!--
async or make method synchronous, [IDE1006] fix naming rule violation, [CS0618] handle member TODO: Fix and remove overrides:
obsolete appropriately, [IDE0270] simplify null check, [IDE0057] simplify substring, [IDE0054] [SA1405] Debug assret message text
use compound assignment, [CSO618] use NVARCARMAX, [IDE0048] add parenthesis for clarity, [SA1121] resolve hiding inherited members
[CS1574] resolve ML comment cref attribute, and remove these overrides --> [SA1117] remove async or make method synchronous
<WarningsNotAsErrors> [IDE1006] fix naming rule violation
SA1405,SA1121,SA1117,SA1116,IDE1006,CS0618,IDE0270,IDE0057,IDE0054,CSO618,IDE0048, [CS0618] handle member obsolete appropriately
CS1574 [IDE0270] simplify null check
</WarningsNotAsErrors> [IDE0057] simplify substring
[IDE0054] use compound assignment
[CSO618] use NVARCARMAX
[IDE0048] add parenthesis for clarity
[CS1574] resolve ML comment cref attribute
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SA1405,SA1121,SA1117,IDE1006,CS0618,IDE0270,IDE0057,IDE0054,CSO618,IDE0048,CS1574</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="NPoco.SqlServer" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<!-- Take top-level depedendency on Azure.Identity, because NPoco.SqlServer depends on a vulnerable version --> <!-- Take top-level depedendency on Azure.Identity, because NPoco.SqlServer depends on a vulnerable version -->
<PackageReference Include="Azure.Identity" /> <PackageReference Include="Azure.Identity" />
<PackageReference Include="NPoco.SqlServer" />
<!-- Take top-level depedendency on System.Runtime.Caching, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version --> <!-- Take top-level depedendency on System.Runtime.Caching, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageReference Include="System.Runtime.Caching" /> <PackageReference Include="System.Runtime.Caching" />
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens --> <!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens"/> <PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
<!-- Take top-level depedendency on System.Text.Encodings.Web, because Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer, Dazinator.Extensions.FileProviders depends on a vulnerable version -->
<!-- Both Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer, Dazinator.Extensions.FileProviders bring in legacy versions of System.Text.Encodings.Web --> <PackageReference Include="System.Text.Encodings.Web" />
<PackageReference Include="System.Text.Encodings.Web"/> <!-- Take top-level depedendency on Microsoft.Data.SqlClient, because NPoco.SqlServer depends on a vulnerable version -->
<!-- NPoco.SqlServer bring in vulnerable version of Microsoft.Data.SqlClient -->
<PackageReference Include="Microsoft.Data.SqlClient" /> <PackageReference Include="Microsoft.Data.SqlClient" />
</ItemGroup> </ItemGroup>

View File

@@ -3,10 +3,15 @@
<Title>Umbraco CMS - Persistence - SQLite</Title> <Title>Umbraco CMS - Persistence - SQLite</Title>
<Description>Adds support for SQLite to Umbraco CMS.</Description> <Description>Adds support for SQLite to Umbraco CMS.</Description>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: [CS0114] Resolve hiding inherited members and remove this override --> <!--
<WarningsNotAsErrors>CS0114</WarningsNotAsErrors> TODO: Fix and remove overrides:
[CS0114] Resolve hiding inherited members
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),CS0114</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite" /> <PackageReference Include="Microsoft.Data.Sqlite" />
</ItemGroup> </ItemGroup>

View File

@@ -4,77 +4,95 @@
<Description>Contains the static assets needed to run Umbraco CMS.</Description> <Description>Contains the static assets needed to run Umbraco CMS.</Description>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<StaticWebAssetBasePath>/</StaticWebAssetBasePath> <StaticWebAssetBasePath>/</StaticWebAssetBasePath>
<CompressionEnabled>false</CompressionEnabled> <!-- Disable compression. E.g. for umbraco backoffice files. These files should be precompressed by node and not let dotnet handle it --> <!-- Disable compression for static files, because MapStaticAssets() is not used anyway (yet) -->
<CompressionEnabled>false</CompressionEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: [NU5123] Rename files so path is shorter and remove this override --> <!--
<WarningsNotAsErrors>NU5123</WarningsNotAsErrors> TODO: Fix and remove overrides:
[NU5123] Rename files so path is shorter
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),NU5123</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" /> <FrameworkReference Include="Microsoft.AspNetCore.App" />
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Cms.Api.Management\Umbraco.Cms.Api.Management.csproj" /> <ProjectReference Include="..\Umbraco.Cms.Api.Management\Umbraco.Cms.Api.Management.csproj" />
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" /> <ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup> </ItemGroup>
<!-- Restore and build backoffice project -->
<PropertyGroup> <PropertyGroup>
<BasePath>$(ProjectDir)wwwroot\umbraco</BasePath> <BackofficeProjectDirectory Condition="'$(BackofficeProjectDirectory)' == ''">..\Umbraco.Web.UI.Client\</BackofficeProjectDirectory>
<BellissimaPath>$(BasePath)\backoffice</BellissimaPath> <BackofficeAssetsPath>wwwroot\umbraco\backoffice</BackofficeAssetsPath>
<LoginPath>$(BasePath)\login</LoginPath>
</PropertyGroup> </PropertyGroup>
<Target Name="BuildStaticAssetsPreconditions" BeforeTargets="Build">
<Message Text="Skip BuildBellissima target because UmbracoBuild is '$(UmbracoBuild)' (this is not Visual Studio)" Importance="high" Condition="'$(UmbracoBuild)' != ''" />
<Message Text="Skip BuildBellissima target because '$(BellissimaPath)' already exists" Importance="high" Condition="Exists('$(BellissimaPath)')" />
<Message Text="Call BuildBellissima target because UmbracoBuild is empty (this is Visual Studio) and '$(BellissimaPath)' doesn't exist" Importance="high" Condition="'$(UmbracoBuild)' == '' and !Exists('$(BellissimaPath)')" />
<CallTarget Targets="BuildBellissima" Condition="'$(UmbracoBuild)' == '' and !Exists('$(BellissimaPath)')" />
<Message Text="Skip BuildLogin target because UmbracoBuild is '$(UmbracoBuild)' (this is not Visual Studio)" Importance="high" Condition="'$(UmbracoBuild)' != ''" />
<Message Text="Skip BuildLogin target because '$(LoginPath)' already exists" Importance="high" Condition="Exists('$(LoginPath)')" />
<Message Text="Call BuildLogin target because UmbracoBuild is empty (this is Visual Studio) and '$(LoginPath)' doesn't exist" Importance="high" Condition="'$(UmbracoBuild)' == '' and !Exists('$(LoginPath)')" />
<CallTarget Targets="BuildLogin" Condition="'$(UmbracoBuild)' == '' and !Exists('$(LoginPath)')" />
</Target>
<Target Name="BuildBellissima">
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm ci --no-fund --no-audit --prefer-offline" />
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm run build:for:cms" />
</Target>
<Target Name="BuildBelle">
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm ci --no-fund --no-audit --prefer-offline" Timeout="600000" />
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm run build:skip-tests" Timeout="600000" />
</Target>
<Target Name="BuildLogin">
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Login\" Command="npm ci --no-fund --no-audit --prefer-offline" Timeout="600000" />
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Login\" Command="npm run build" Timeout="600000" />
</Target>
<Target Name="CleanStaticAssetsPreconditions" AfterTargets="Clean" Condition="'$(UmbracoBuild)' == ''">
<Message Text="Skip CleanBellissima target because '$(BellissimaPath)' doesn't exist" Importance="high" Condition="!Exists('$(BellissimaPath)')" />
<Message Text="Skip CleanBellissima target because preserve.bellissima marker file exists" Importance="high" Condition="Exists('$(BellissimaPath)') and Exists('$(SolutionDir)preserve.bellissima')" />
<Message Text="Call CleanBellissima target because '$(BellissimaPath)' exists and preserve.bellissima marker file doesn't exist" Importance="high" Condition="Exists('$(BellissimaPath)') and !Exists('$(SolutionDir)preserve.bellissima')" />
<CallTarget Targets="CleanBellissima" Condition="Exists('$(BellissimaPath)') and !Exists('$(SolutionDir)preserve.bellissima')" />
<Message Text="Skip CleanLogin target because '$(LoginPath)' doesn't exist" Importance="high" Condition="!Exists('$(LoginPath)')" />
<Message Text="Skip CleanLogin target because preserve.login marker file exists" Importance="high" Condition="Exists('$(LoginPath)') and Exists('$(SolutionDir)preserve.login')" />
<Message Text="Call CleanLogin target because '$(LoginPath)' exists and preserve.login marker file doesn't exist" Importance="high" Condition="Exists('$(LoginPath)') and !Exists('$(SolutionDir)preserve.login')" />
<CallTarget Targets="CleanLogin" Condition="Exists('$(LoginPath)') and !Exists('$(SolutionDir)preserve.login')" />
</Target>
<Target Name="CleanBellissima">
<ItemGroup> <ItemGroup>
<BellissimaDirectories Include="$(BellissimaPath);" /> <BackofficeAssetsInputs Include="$(BackofficeProjectDirectory)package.json;$(BackofficeProjectDirectory)package-lock.json;$(BackofficeProjectDirectory)src\**" Exclude="$(DefaultItemExcludes)" />
<Content Remove="$(BackofficeAssetsPath)\**" />
</ItemGroup> </ItemGroup>
<RemoveDir Directories="@(BellissimaDirectories)" />
<Target Name="RestoreBackoffice" Inputs="$(BackofficeProjectDirectory)package-lock.json" Outputs="$(BackofficeProjectDirectory)node_modules\.package-lock.json">
<Message Importance="high" Text="Restoring Backoffice NPM packages..." />
<Exec Command="npm ci --no-fund --no-audit --prefer-offline" WorkingDirectory="$(BackofficeProjectDirectory)" />
</Target> </Target>
<Target Name="CleanLogin"> <Target Name="BuildBackoffice" DependsOnTargets="RestoreBackoffice" BeforeTargets="AssignTargetPaths" Inputs="@(BackofficeAssetsInputs)" Outputs="$(IntermediateOutputPath)backoffice.complete.txt">
<Message Importance="high" Text="Executing Backoffice NPM build script..." />
<Exec Command="npm run build:for:cms" WorkingDirectory="$(BackofficeProjectDirectory)" />
<ItemGroup> <ItemGroup>
<LoginDirectories Include="$(LoginPath);" /> <_BackofficeAssetsBuildOutput Include="$(BackofficeAssetsPath)\**" />
</ItemGroup> </ItemGroup>
<RemoveDir Directories="@(LoginDirectories)" /> <WriteLinesToFile File="$(IntermediateOutputPath)backoffice.complete.txt" Lines="@(_BackofficeAssetsBuildOutput)" Overwrite="true" />
</Target>
<Target Name="DefineBackofficeAssets" AfterTargets="BuildBackoffice" DependsOnTargets="ResolveStaticWebAssetsConfiguration">
<ItemGroup>
<FileWrites Include="@(_BackofficeAssetsBuildOutput)" />
<FileWrites Include="$(IntermediateOutputPath)backoffice.complete.txt" />
</ItemGroup>
<DefineStaticWebAssets CandidateAssets="@(_BackofficeAssetsBuildOutput)" SourceId="$(PackageId)" SourceType="Computed" ContentRoot="$(ProjectDir)wwwroot" BasePath="$(StaticWebAssetBasePath)">
<Output TaskParameter="Assets" ItemName="StaticWebAsset" />
</DefineStaticWebAssets>
</Target>
<!-- Restore and build login project -->
<PropertyGroup>
<LoginProjectDirectory Condition="'$(LoginProjectDirectory)' == ''">..\Umbraco.Web.UI.Login\</LoginProjectDirectory>
<LoginAssetsPath>wwwroot\umbraco\login</LoginAssetsPath>
</PropertyGroup>
<ItemGroup>
<LoginAssetsInputs Include="$(LoginProjectDirectory)**" Exclude="$(DefaultItemExcludes)" />
<Content Remove="$(LoginAssetsPath)\**" />
</ItemGroup>
<Target Name="RestoreLogin" Inputs="$(LoginProjectDirectory)package-lock.json" Outputs="$(LoginProjectDirectory)node_modules/.package-lock.json">
<Message Importance="high" Text="Restoring Login NPM packages..." />
<Exec Command="npm ci --no-fund --no-audit --prefer-offline" WorkingDirectory="$(LoginProjectDirectory)" />
</Target>
<Target Name="BuildLogin" DependsOnTargets="RestoreLogin" BeforeTargets="AssignTargetPaths" Inputs="@(LoginAssetsInputs)" Outputs="$(IntermediateOutputPath)login.complete.txt">
<Message Importance="high" Text="Executing Login NPM build script..." />
<Exec Command="npm run build" WorkingDirectory="$(LoginProjectDirectory)" />
<ItemGroup>
<_LoginAssetsBuildOutput Include="$(LoginAssetsPath)\**" />
</ItemGroup>
<WriteLinesToFile File="$(IntermediateOutputPath)login.complete.txt" Lines="@(_LoginAssetsBuildOutput)" Overwrite="true" />
</Target>
<Target Name="DefineLoginAssets" AfterTargets="BuildLogin" DependsOnTargets="ResolveStaticWebAssetsConfiguration">
<ItemGroup>
<FileWrites Include="@(_LoginAssetsBuildOutput)" />
<FileWrites Include="$(IntermediateOutputPath)login.complete.txt" />
</ItemGroup>
<DefineStaticWebAssets CandidateAssets="@(_LoginAssetsBuildOutput)" SourceId="$(PackageId)" SourceType="Computed" ContentRoot="$(ProjectDir)wwwroot" BasePath="$(StaticWebAssetBasePath)">
<Output TaskParameter="Assets" ItemName="StaticWebAsset" />
</DefineStaticWebAssets>
</Target> </Target>
</Project> </Project>

View File

@@ -5,11 +5,17 @@
<IncludeBuildOutput>false</IncludeBuildOutput> <IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols> <IncludeSymbols>false</IncludeSymbols>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: [IDE0270] Simplify null checks, [CS0108] resolve hiding inherited members, [CS1998] remove <!--
async or make method synchronous, and remove these overrides --> TODO: Fix and remove overrides:
<WarningsNotAsErrors>IDE0270,CS0108,CS1998</WarningsNotAsErrors> [IDE0270] Simplify null checks
[CS0108] resolve hiding inherited members
[CS1998] remove async or make method synchronous
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),IDE0270,CS0108,CS1998</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Cms.Api.Delivery\Umbraco.Cms.Api.Delivery.csproj" /> <ProjectReference Include="..\Umbraco.Cms.Api.Delivery\Umbraco.Cms.Api.Delivery.csproj" />
<ProjectReference Include="..\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj" /> <ProjectReference Include="..\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj" />
@@ -24,7 +30,7 @@
<PropertyGroup> <PropertyGroup>
<_UmbracoCmsJsonSchemaReference>appsettings-schema.Umbraco.Cms.json</_UmbracoCmsJsonSchemaReference> <_UmbracoCmsJsonSchemaReference>appsettings-schema.Umbraco.Cms.json</_UmbracoCmsJsonSchemaReference>
<_UmbracoCmsPackageSchemaReference>umbraco-package-schema.json</_UmbracoCmsPackageSchemaReference> <_UmbracoCmsPackageSchemaReference>umbraco-package-schema.json</_UmbracoCmsPackageSchemaReference>
<NoWarn>NU5100;NU5128</NoWarn> <NoWarn>$(NoWarn),NU5100,NU5128</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Umbraco.JsonSchema.Extensions" PrivateAssets="all" GeneratePathProperty="true" /> <PackageReference Include="Umbraco.JsonSchema.Extensions" PrivateAssets="all" GeneratePathProperty="true" />

View File

@@ -5,22 +5,36 @@
<Description>Contains the core assembly needed to run Umbraco CMS.</Description> <Description>Contains the core assembly needed to run Umbraco CMS.</Description>
<RootNamespace>Umbraco.Cms.Core</RootNamespace> <RootNamespace>Umbraco.Cms.Core</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix [SA1117] params all on same line, [SA1401] make fields private, [SA1134] own line <!--
attributes, [SA1649] file name match type, [CS0618]/[CS0672]/[SYSLIB0051]/[SYSLIB0044]/[SYSLIB0023] TODO: Fix and remove overrides:
/[SYSLIB0003]/[SYSLIB0045] adjust obsolete references, [CS0067] unused event, [SA1405] debug [SA1117] params all on same line
provide message text, [CS0168]/[CS0169] unused fields/variables, [CS0183] always of type, [SA1401] make fields private
[SA1111] adjust parenthesis, [SA1649] file name match type name, [CA2017] match parameters number, [SA1134] own line attributes
[CS0108] hidden inherited member, [CS0649] default value always null, [CS1574] unresolveable cref, [SA1649] file name match type
[CS1998] remove async or make method synchronous, [CS8073] result always true/false, [IDE0060] [CS0618]/[CS0672]/[SYSLIB0051]/[SYSLIB0044]/[SYSLIB0023]/[SYSLIB0003]/[SYSLIB0045] adjust obsolete references
remove unused parameter, [IDE1006] naming prefix, [SA1306] field name, [CS1723] XML TEntity, [CS0067] unused event
[CS0419] ambiguous cref, [CS0612] obsolete, and remove overrides --> [SA1405] debug provide message text
<WarningsNotAsErrors> [CS0168]/[CS0169] unused fields/variables
SA1117,SA1401,SA1134,SA1649,CS0618,CS0067,SA1405,SA1600,CS0168,CS0169,CS0183,SYSLIB0045,SYSLIB0051, [CS0183] always of type
SYSLIB0044,SYSLIB0023,SYSLIB0003,SA1111,SA1649,CA2017,CS0108,CS0612,CS0649,CS0672,CS1574,CS1998,CS8073, [SA1111] adjust parenthesis
IDE0060,IDE1006,SA1306,CS1723,CS0419 [CA2017] match parameters number
</WarningsNotAsErrors> [CS0108] hidden inherited member
[CS0612] obsolete
[CS0649] default value always null
[CS1574] unresolveable cref
[CS1998] remove async or make method synchronous
[CS8073] result always true/false
[IDE0060] remove unused parameter
[IDE1006] naming prefix
[SA1306] field name
[CS1723] XML TEntity
[CS0419] ambiguous cref
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SA1117,SA1401,SA1134,SA1649,CS0618,CS0672,SYSLIB0051,SYSLIB0044,SYSLIB0023,SYSLIB0003,SYSLIB0045,CS0067,SA1405,CS0168,CS0169,CS0183,SA1111,CA2017,CS0108,CS0612,CS0649,CS1574,CS1998,CS8073,IDE0060,IDE1006,SA1306,CS1723,CS0419</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" /> <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" />

View File

@@ -5,15 +5,23 @@
<Description>Adds Examine searching support using Lucene to Umbraco CMS.</Description> <Description>Adds Examine searching support using Lucene to Umbraco CMS.</Description>
<RootNamespace>Umbraco.Cms.Infrastructure.Examine</RootNamespace> <RootNamespace>Umbraco.Cms.Infrastructure.Examine</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: [CS0618] Handle member obsolete appropriately and remove this override --> <!--
<WarningsNotAsErrors>CS0618</WarningsNotAsErrors> TODO: Fix and remove overrides:
[CS0618] Handle member obsolete appropriately
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),CS0618</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Examine" /> <PackageReference Include="Examine" />
</ItemGroup>
<ItemGroup>
<!-- Take top-level depedendency on System.Security.Cryptography.Xml, because Examine depends on a vulnerable version --> <!-- Take top-level depedendency on System.Security.Cryptography.Xml, because Examine depends on a vulnerable version -->
<PackageReference Include="System.Security.Cryptography.Xml" /> <PackageReference Include="System.Security.Cryptography.Xml" />
<!-- Take top-level depedendency on Lucene.Net.Replicator--> <!-- Take top-level depedendency on Lucene.Net.Replicator, because Examine depends on a vulnerable version -->
<PackageReference Include="Lucene.Net.Replicator" /> <PackageReference Include="Lucene.Net.Replicator" />
</ItemGroup> </ItemGroup>

View File

@@ -5,19 +5,32 @@
<Description>Contains the infrastructure assembly needed to run Umbraco CMS.</Description> <Description>Contains the infrastructure assembly needed to run Umbraco CMS.</Description>
<RootNamespace>Umbraco.Cms.Infrastructure</RootNamespace> <RootNamespace>Umbraco.Cms.Infrastructure</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix [CS0618] handle member obsolete appropriately, [CA1416] validate platform compatibility, <!--
[SA1117] params all on same line, [SA1401] make fields private, [SA1134] own line attributes, TODO: Fix and remove overrides:
[CA2017] match parameters number, [CS0108] hidden inherited member, [SYSLIB0051] formatter-based [CS0618] handle member obsolete appropriately
serialization, [SA1649] filename match type name, [CS1998] remove async or make method synchronous, [CA1416] validate platform compatibility
[CS0169] unused field, [CS0114] hidden inherited member, [IDE0060] remove unused parameter, [SA1117] params all on same line
[SA1130] use lamda syntax, [IDE1006] naming violation, [CS1066] default value, [CS0612] obsolete, [SA1401] make fields private
[CS1574] resolve cref, and remove overrides --> [SA1134] own line attributes
<WarningsNotAsErrors> [CA2017] match parameters number
CS0618,CA1416,SA1117,SA1401,SA1134,CA2017,CS0108,SYSLIB0051,SA1649,CS1998,CS0169,CS0114,IDE0060, [CS0108] hidden inherited member
SA1130,IDE1006,CS1066,CS0612,CS1574 [SYSLIB0051] formatter-based serialization
</WarningsNotAsErrors> [SA1649] filename match type name
[CS1998] remove async or make method synchronous
[CS0169] unused field
[CS0114] hidden inherited member
[IDE0060] remove unused parameter
[SA1130] use lamda syntax
[IDE1006] naming violation
[CS1066] default value
[CS0612] obsolete
[CS1574] resolve cref
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),CS0618,CA1416,SA1117,SA1401,SA1134,CA2017,CS0108,SYSLIB0051,SA1649,CS1998,CS0169,CS0114,IDE0060,SA1130,IDE1006,CS1066,CS0612,CS1574</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DefineConstants>$(DefineConstants);TRACE_SCOPES</DefineConstants> <DefineConstants>$(DefineConstants);TRACE_SCOPES</DefineConstants>
</PropertyGroup> </PropertyGroup>
@@ -48,8 +61,10 @@
<PackageReference Include="Serilog.Sinks.Async" /> <PackageReference Include="Serilog.Sinks.Async" />
<PackageReference Include="Serilog.Sinks.File" /> <PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="Serilog.Sinks.Map" /> <PackageReference Include="Serilog.Sinks.Map" />
</ItemGroup>
<!-- Take top-level depedendency on System.Text.RegularExpressions, because both Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc depend on a vulnerable version --> <ItemGroup>
<!-- Take top-level depedendency on System.Text.RegularExpressions, because Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc depends on a vulnerable version -->
<PackageReference Include="System.Text.RegularExpressions" /> <PackageReference Include="System.Text.RegularExpressions" />
</ItemGroup> </ItemGroup>
@@ -80,8 +95,4 @@
<_Parameter1>Umbraco.Cms.Infrastructure</_Parameter1> <_Parameter1>Umbraco.Cms.Infrastructure</_Parameter1>
</AssemblyAttribute> </AssemblyAttribute>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Remove="Persistence\Mappers\MacroMapper.cs" />
</ItemGroup>
</Project> </Project>

View File

@@ -1,17 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<PackageId>Umbraco.Cms.PublishedCache.HybridCache</PackageId> <PackageId>Umbraco.Cms.PublishedCache.HybridCache</PackageId>
<Title>Umbraco CMS - Published cache - HybridCache</Title> <Title>Umbraco CMS - Published cache - HybridCache</Title>
<Description>Contains the published cache assembly needed to run Umbraco CMS.</Description> <Description>Contains the published cache assembly needed to run Umbraco CMS.</Description>
<RootNamespace>Umbraco.Cms.Infrastructure.HybridCache</RootNamespace> <RootNamespace>Umbraco.Cms.Infrastructure.HybridCache</RootNamespace>
<!-- TODO: Enable package validation in v16 by removing this line -->
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix all warnings and remove this override --> <!-- TODO: Fix all warnings and remove this override -->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Hybrid" /> <PackageReference Include="Microsoft.Extensions.Caching.Hybrid" />
<PackageReference Include="MessagePack" /> <PackageReference Include="MessagePack" />
@@ -43,5 +42,4 @@
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" /> <ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" /> <ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -5,16 +5,23 @@
<Description>Contains the web assembly needed to run Umbraco CMS.</Description> <Description>Contains the web assembly needed to run Umbraco CMS.</Description>
<RootNamespace>Umbraco.Cms.Web.Common</RootNamespace> <RootNamespace>Umbraco.Cms.Web.Common</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix [SA1117] params all on same line, [SA1401] make fields private, [SA1134] own line <!--
attributes, [ASP0019] use IHeaderDictionary.Append or the indexer to append or set headers, TODO: Fix and remove overrides:
[CS0618]/[SYSLIB0051] adjust obsolete references, [IDE0040]/[SA1400] access modifiers, [SA1405] [SA1117] params all on same line
Debug assert message text, [CS0419]/[CS1574] cref ambiguities, [SA1649] file name match type, [SA1401] make fields private
and remove overrides --> [SA1134] own line attributes
<WarningsNotAsErrors> [ASP0019] use IHeaderDictionary.Append or the indexer to append or set headers
SA1117,SA1401,SA1134,ASP0019,CS0618,IDE0040,SA1400,SA1405,SYSLIB0051,CS0419,CS1574,SA1649 [CS0618]/[SYSLIB0051] adjust obsolete references
</WarningsNotAsErrors> [IDE0040]/[SA1400] access modifiers
[SA1405] Debug assert message text
[CS0419]/[CS1574] cref ambiguities
[SA1649] file name match type
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SA1117,SA1401,SA1134,ASP0019,CS0618,SYSLIB0051,IDE0040,SA1400,SA1405,CS0419,CS1574,SA1649</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" /> <FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup> </ItemGroup>
@@ -26,20 +33,22 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" /> <PackageReference Include="MiniProfiler.AspNetCore.Mvc" />
<PackageReference Include="Serilog.AspNetCore" /> <PackageReference Include="Serilog.AspNetCore" />
</ItemGroup>
<ItemGroup>
<!-- Take top-level depedendency on System.Net.Http, because Dazinator.Extensions.FileProviders depends on a vulnerable version --> <!-- Take top-level depedendency on System.Net.Http, because Dazinator.Extensions.FileProviders depends on a vulnerable version -->
<PackageReference Include="System.Net.Http" /> <PackageReference Include="System.Net.Http" />
<!-- Take top-level depedendency on System.Text.RegularExpressions, because both Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc depend on a vulnerable version --> <!-- Take top-level depedendency on System.Text.RegularExpressions, because Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc depends on a vulnerable version -->
<PackageReference Include="System.Text.RegularExpressions" /> <PackageReference Include="System.Text.RegularExpressions" />
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens --> <!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens"/> <PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
<!-- Both Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer, Dazinator.Extensions.FileProviders bring in legacy versions of System.Text.Encodings.Web --> <!-- Take top-level depedendency on System.Text.Encodings.Web, because Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer, Dazinator.Extensions.FileProviders depends on a vulnerable version -->
<PackageReference Include="System.Text.Encodings.Web"/> <PackageReference Include="System.Text.Encodings.Web" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Examine.Lucene\Umbraco.Examine.Lucene.csproj" /> <ProjectReference Include="..\Umbraco.Examine.Lucene\Umbraco.Examine.Lucene.csproj" />
<ProjectReference Include="..\Umbraco.PublishedCache.HybridCache\Umbraco.PublishedCache.HybridCache.csproj" /> <ProjectReference Include="..\Umbraco.PublishedCache.HybridCache\Umbraco.PublishedCache.HybridCache.csproj" />
<!-- <ProjectReference Include="..\Umbraco.PublishedCache.NuCache\Umbraco.PublishedCache.NuCache.csproj" />-->
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -3,13 +3,18 @@
<RootNamespace>Umbraco.Cms.Web.UI</RootNamespace> <RootNamespace>Umbraco.Cms.Web.UI</RootNamespace>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation> <EnablePackageValidation>false</EnablePackageValidation>
<CompressionEnabled>false</CompressionEnabled> <!-- Disable compression. E.g. for umbraco backoffice files. These files should be precompressed by node and not let dotnet handle it --> <!-- Disable compression for static files, because MapStaticAssets() is not used anyway (yet) -->
<CompressionEnabled>false</CompressionEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: [SA1119] Correct unnecessary parenthesis and remove this override --> <!--
<WarningsNotAsErrors>SA1119</WarningsNotAsErrors> TODO: Fix and remove overrides:
[SA1119] Correct unnecessary parenthesis
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SA1119</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.props" /> <Import Project="..\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.props" />
<Import Project="..\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.targets" /> <Import Project="..\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.targets" />
<ItemGroup> <ItemGroup>

View File

@@ -25,8 +25,8 @@ internal class SurfaceControllerMatcherPolicy : MatcherPolicy, IEndpointSelector
public Task ApplyAsync(HttpContext httpContext, CandidateSet candidates) public Task ApplyAsync(HttpContext httpContext, CandidateSet candidates)
{ {
ArgumentNullException.ThrowIfNull(nameof(httpContext)); ArgumentNullException.ThrowIfNull(httpContext);
ArgumentNullException.ThrowIfNull(nameof(candidates)); ArgumentNullException.ThrowIfNull(candidates);
if (candidates.Count < 2) if (candidates.Count < 2)
{ {

View File

@@ -5,17 +5,19 @@
<Description>Contains the website assembly needed to run the frontend of Umbraco CMS.</Description> <Description>Contains the website assembly needed to run the frontend of Umbraco CMS.</Description>
<RootNamespace>Umbraco.Cms.Web.Website</RootNamespace> <RootNamespace>Umbraco.Cms.Web.Website</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: [ASP0019] use IHeaderDictionary.Append or the indexer to append or set headers, <!--
[CS0618] handle member obsolete appropriately, [SA1401] make fields private, TODO: Fix and remove overrides:
[SA1649] update file name, and remove this override, [IDE1006] fix naming rule violation, [ASP0019] use IHeaderDictionary.Append or the indexer to append or set headers
and remove these overrides --> [CS0618] handle member obsolete appropriately
<WarningsNotAsErrors>ASP0019,CS0618,SA1401,SA1649,IDE0270,IDE1006</WarningsNotAsErrors> [SA1401] make fields private
</PropertyGroup> [SA1649] update file name, and remove this override
<PropertyGroup> [IDE1006] fix naming rule violation
<!-- TODO: Fix all warnings and remove this override --> -->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <WarningsNotAsErrors>$(WarningsNotAsErrors),ASP0019,CS0618,SA1401,SA1649,IDE1006</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" /> <ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -9,8 +9,40 @@
<NoDefaultExcludes>true</NoDefaultExcludes> <NoDefaultExcludes>true</NoDefaultExcludes>
<IncludeContentInPack>true</IncludeContentInPack> <IncludeContentInPack>true</IncludeContentInPack>
<ContentTargetFolders>.</ContentTargetFolders> <ContentTargetFolders>.</ContentTargetFolders>
<NoWarn>NU5128</NoWarn> <NoWarn>$(NoWarn),NU5128</NoWarn>
</PropertyGroup> </PropertyGroup>
<!-- Added project references as the sample API in umbraco-extension will fail -->
<ItemGroup>
<ProjectReference Include="..\src\Umbraco.Cms.Api.Common\Umbraco.Cms.Api.Common.csproj" />
<ProjectReference Include="..\src\Umbraco.Cms.Api.Management\Umbraco.Cms.Api.Management.csproj" />
<ProjectReference Include="..\src\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
<ProjectReference Include="..\src\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup>
<!-- Update template.json files with the default UmbracoVersion value set to the current build version -->
<ItemGroup>
<PackageReference Include="Umbraco.JsonSchema.Extensions" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Content Update="**\.template.config\template.json" Pack="false" />
</ItemGroup>
<Target Name="GetUpdatedTemplateJsonPackageFiles" BeforeTargets="GenerateNuspec" AfterTargets="GetUmbracoBuildVersion">
<ItemGroup>
<_TemplateJsonFiles Include="**\.template.config\template.json" Exclude="bin\**;obj\**" />
<_TemplateJsonFiles>
<DestinationFile>$(IntermediateOutputPath)%(RelativeDir)%(Filename)%(Extension)</DestinationFile>
</_TemplateJsonFiles>
</ItemGroup>
<Copy SourceFiles="@(_TemplateJsonFiles)" DestinationFiles="%(DestinationFile)" />
<JsonPathUpdateValue JsonFile="%(_TemplateJsonFiles.DestinationFile)" Path="$.symbols.FinalVersion.parameters.cases.[0].value" Value="&quot;$(PackageVersion)&quot;" />
<ItemGroup>
<_PackageFiles Include="%(_TemplateJsonFiles.DestinationFile)">
<PackagePath>%(_TemplateJsonFiles.RelativeDir)</PackagePath>
</_PackageFiles>
</ItemGroup>
</Target>
<ItemGroup> <ItemGroup>
<Content Include="..\src\Umbraco.Web.UI\Program.cs"> <Content Include="..\src\Umbraco.Web.UI\Program.cs">
<Link>UmbracoProject\Program.cs</Link> <Link>UmbracoProject\Program.cs</Link>
@@ -32,33 +64,4 @@
<PackagePath>UmbracoProject\Views</PackagePath> <PackagePath>UmbracoProject\Views</PackagePath>
</Content> </Content>
</ItemGroup> </ItemGroup>
<!-- Update template.json files with the default UmbracoVersion value set to the current build version -->
<ItemGroup>
<PackageReference Include="Umbraco.JsonSchema.Extensions" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Content Update="**\.template.config\template.json" Pack="false" />
</ItemGroup>
<!-- Added project references as the sample API in umbraco-extension will fail -->
<ItemGroup>
<ProjectReference Include="..\src\Umbraco.Cms.Api.Common\Umbraco.Cms.Api.Common.csproj" />
<ProjectReference Include="..\src\Umbraco.Cms.Api.Management\Umbraco.Cms.Api.Management.csproj" />
<ProjectReference Include="..\src\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
<ProjectReference Include="..\src\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup>
<Target Name="GetUpdatedTemplateJsonPackageFiles" BeforeTargets="GenerateNuspec" AfterTargets="GetUmbracoBuildVersion">
<ItemGroup>
<_TemplateJsonFiles Include="**\.template.config\template.json" Exclude="bin\**;obj\**" />
<_TemplateJsonFiles>
<DestinationFile>$(IntermediateOutputPath)%(RelativeDir)%(Filename)%(Extension)</DestinationFile>
</_TemplateJsonFiles>
</ItemGroup>
<Copy SourceFiles="@(_TemplateJsonFiles)" DestinationFiles="%(DestinationFile)" />
<JsonPathUpdateValue JsonFile="%(_TemplateJsonFiles.DestinationFile)" Path="$.symbols.FinalVersion.parameters.cases.[0].value" Value="&quot;$(PackageVersion)&quot;" />
<ItemGroup>
<_PackageFiles Include="%(_TemplateJsonFiles.DestinationFile)">
<PackagePath>%(_TemplateJsonFiles.RelativeDir)</PackagePath>
</_PackageFiles>
</ItemGroup>
</Target>
</Project> </Project>

View File

@@ -1,12 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<!-- TODO: [CS0618] handle member obsolete appropriately, [IDE1006] fix naming rule violation, <!--
[IDE0057] simplify substring and remove this override --> TODO: Fix and remove overrides:
<WarningsNotAsErrors>CS0618,IDE1006,IDE0057</WarningsNotAsErrors> [CS0618] handle member obsolete appropriately
[IDE1006] fix naming rule violation
[IDE0057] simplify substring
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),CS0618,IDE1006,IDE0057</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Bogus" /> <PackageReference Include="Bogus" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\Umbraco.Cms\Umbraco.Cms.csproj" /> <ProjectReference Include="..\..\src\Umbraco.Cms\Umbraco.Cms.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -5,11 +5,18 @@
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<GenerateProgramFile>false</GenerateProgramFile> <GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix [SYSLIB0021] API supports obsolete serialization, [IDE0060] removed unused parameters, <!--
[CS0618] update obsolete references, CS0649 field not assigned too, and remove overrides --> TODO: Fix and remove overrides:
<WarningsNotAsErrors>SYSLIB0021,IDE0060,CS0618,CS0649</WarningsNotAsErrors> [SYSLIB0021] API supports obsolete serialization
[IDE0060] removed unused parameters
[CS0618] update obsolete references
[CS0649] field not assigned too
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SYSLIB0021,IDE0060,CS0618,CS0649</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="BenchmarkDotNet" /> <PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" />

View File

@@ -7,15 +7,21 @@
<IsPackable>true</IsPackable> <IsPackable>true</IsPackable>
<EnablePackageValidation>$(BaseEnablePackageValidation)</EnablePackageValidation> <EnablePackageValidation>$(BaseEnablePackageValidation)</EnablePackageValidation>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix [CS1998] async, [CSO618] obsolete references, fix [SYSLIB0012] obsolete references, <!--
and remove overrides --> TODO: Fix and remove overrides:
<WarningsNotAsErrors>CS1998,CS0618,SYSLIB0012</WarningsNotAsErrors> [CS1998] async
[CS0618] obsolete references
[SYSLIB0012] obsolete references
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),CS1998,CS0618,SYSLIB0012</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoFixture.AutoMoq" /> <PackageReference Include="AutoFixture.AutoMoq" />
<PackageReference Include="Moq" />
<PackageReference Include="AutoFixture.NUnit3" /> <PackageReference Include="AutoFixture.NUnit3" />
<PackageReference Include="Moq" />
<PackageReference Include="NUnit" /> <PackageReference Include="NUnit" />
</ItemGroup> </ItemGroup>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.TemplateServiceTests.Deleting_Master_Template_Also_Deletes_Children</Target>
<Left>lib/net9.0/Umbraco.Tests.Integration.dll</Left>
<Right>lib/net9.0/Umbraco.Tests.Integration.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
</Suppressions>

View File

@@ -6,19 +6,27 @@
<Description>Contains helper classes for integration tests with Umbraco CMS, including all internal integration tests.</Description> <Description>Contains helper classes for integration tests with Umbraco CMS, including all internal integration tests.</Description>
<RootNamespace>Umbraco.Cms.Tests.Integration</RootNamespace> <RootNamespace>Umbraco.Cms.Tests.Integration</RootNamespace>
<IsPackable>true</IsPackable> <IsPackable>true</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation> <EnablePackageValidation>$(BaseEnablePackageValidation)</EnablePackageValidation>
<NoWarn>NU5100</NoWarn> <NoWarn>$(NoWarn),NU5100</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix [CS0108] hidden inherited members, fix [SYSLIB0012] and [CS0618] obsolete references, <!--
[CS1998] async, [SA1116] and [SA1117] parameter formatting, [CS0162] unreachable code, [CS0169] TODO: Fix and remove overrides:
unused fields, [SA1134] attribute on each line of code, [SA1405] Debug.Assert provide message text, [CS0108] hidden inherited members
[CS4014]/[CS1998] await call, [CS0649] field not assigned to, [CS0168] unused variable, [SYSLIB0012] and [CS0618] obsolete references
and remove overrides --> [SA1116] and [SA1117] parameter formatting
<WarningsNotAsErrors> [CS0162] unreachable code
SYSLIB0012,SA1117,SA1116,CS0162,CS0169,SA1134,SA1405,CS0108,CS0618,CS4014,CS1998,CS0649,CS0168 [CS0169] unused fields
</WarningsNotAsErrors> [SA1134] attribute on each line of code
[SA1405] Debug.Assert provide message text
[CS4014]/[CS1998] await call
[CS0649] field not assigned to
[CS0168] unused variable
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),CS0108,SYSLIB0012,CS0618,SA1116,SA1117,CS0162,CS0169,SA1134,SA1405,CS4014,CS1998,CS0649,CS0168</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Bogus" /> <PackageReference Include="Bogus" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
@@ -240,8 +248,4 @@
<DependentUpon>MediaNavigationServiceTests.cs</DependentUpon> <DependentUpon>MediaNavigationServiceTests.cs</DependentUpon>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Tests.Common\Umbraco.Tests.Common.csproj" />
</ItemGroup>
</Project> </Project>

View File

@@ -2,22 +2,32 @@
<PropertyGroup> <PropertyGroup>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
<RootNamespace>Umbraco.Cms.Tests.UnitTests</RootNamespace> <RootNamespace>Umbraco.Cms.Tests.UnitTests</RootNamespace>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix [SYSLIB0013] and [CS0618] obsolete, [CS1998] async, [SA1117] params same line, [CS0067] <!--
unused event, [CA1822] mark members as static, [CA1416] validate platform compatibility, [IDE0028] TODO: Fix and remove overrides:
collection initializers, [SA1401] fields must be private, [SA1405] debug message text, [IDE0060] [SYSLIB0013] and [CS0618] obsolete
remove param, [SA1405] Debug.Assert message text, [ASP0019] header append, [CS0114] inherited [CS1998] async
member, [CS0661]/[CS0659], adjust overrides, [CS0414] unassigned field, [CS0252] confirm [SA1117] params same line
reference comparison, [IDE0060] remove parameter, [IDE1006] fix naming rule violation, [CS0067] unused event
[CS0612] obsolete, and remove overrides --> [CA1822] mark members as static
<WarningsNotAsErrors> [CA1416] validate platform compatibility
SYSLIB0013,CS0618,CS1998,SA1117,CS0067,CA1822,CA1416,IDE0028,SA1401,SA1405 [IDE0028] collection initializers
IDE0060,SA1405,ASP0019,CS0114,CS0661,CS0659,CS0414,CS0252,CS0612,IDE0060,IDE1006 [SA1401] fields must be private
</WarningsNotAsErrors> [SA1405] debug message text
[IDE0060] remove parameter
[ASP0019] header append
[CS0114] inherited member
[CS0661]/[CS0659] adjust overrides
[CS0414] unassigned field
[CS0252] confirm reference comparison
[CS0612] obsolete
[IDE1006] fix naming rule violation
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SYSLIB0013,CS0618,CS1998,SA1117,CS0067,CA1822,CA1416,IDE0028,SA1401,SA1405,IDE0060,ASP0019,CS0114,CS0661,CS0659,CS0414,CS0252,CS0612,IDE1006</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" /> <PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NUnit3TestAdapter" /> <PackageReference Include="NUnit3TestAdapter" />
@@ -30,8 +40,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\NestedContentValueConverterTests.cs" />
<Compile Remove="Umbraco.Core\PropertyEditors\NestedContentPropertyComponentTests.cs" />
<Compile Update="Umbraco.Cms.Api.Management\Services\BackOfficeExternalLoginServiceTests.ExternalLoginStatusForUserAsync.cs"> <Compile Update="Umbraco.Cms.Api.Management\Services\BackOfficeExternalLoginServiceTests.ExternalLoginStatusForUserAsync.cs">
<DependentUpon>BackOfficeExternalLoginServiceTests.cs</DependentUpon> <DependentUpon>BackOfficeExternalLoginServiceTests.cs</DependentUpon>
</Compile> </Compile>
@@ -39,35 +47,4 @@
<DependentUpon>BackOfficeExternalLoginServiceTests.cs</DependentUpon> <DependentUpon>BackOfficeExternalLoginServiceTests.cs</DependentUpon>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
<Compile Remove="Umbraco.Core\DeliveryApi\NestedContentValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
<Compile Remove="Umbraco.Core\DeliveryApi\NestedContentValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
<Compile Remove="Umbraco.Core\DeliveryApi\NestedContentValueConverterTests.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Umbraco.Core\DeliveryApi\MediaPickerValueConverterTests.cs" />
</ItemGroup>
</Project> </Project>

View File

@@ -4,11 +4,18 @@
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation> <EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- TODO: Fix [SA1117] params all on same line, [SA1401] make fields private, <!--
[SA1134] own line attributes, [CS9042] not obsolete, and remove overrides --> TODO: Fix and remove overrides:
<WarningsNotAsErrors>SA1117,SA1401,SA1134,CS9042</WarningsNotAsErrors> [SA1117] params all on same line
[SA1401] make fields private
[SA1134] own line attributes
[CS9042] not obsolete
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SA1117,SA1401,SA1134,CS9042</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="CommandLineParser" VersionOverride="2.9.1" /> <PackageReference Include="CommandLineParser" VersionOverride="2.9.1" />
<PackageReference Include="NJsonSchema" VersionOverride="11.0.2" /> <PackageReference Include="NJsonSchema" VersionOverride="11.0.2" />