Merge remote-tracking branch 'origin/v11/dev' into v11/dev

# Conflicts:
#	.gitignore
This commit is contained in:
Bjarke Berg
2022-10-12 10:48:40 +02:00
11 changed files with 44 additions and 64 deletions

7
.gitignore vendored
View File

@@ -102,9 +102,8 @@ preserve.belle
# Ignore auto-generated schema
/src/Umbraco.Cms.Targets/appsettings-schema.json
/src/Umbraco.Cms.Targets/appsettings-schema.*.json
/src/Umbraco.Web.UI/appsettings-schema.json
/src/Umbraco.Web.UI/appsettings-schema.umbraco.json
/src/Umbraco.Web.UI/appsettings-schema.*.json
/tests/Umbraco.Tests.Integration/appsettings-schema.json
/src/Umbraco.Cms.Targets/appsettings-schema.json
/src/Umbraco.Cms.Targets/appsettings-schema.umbraco.json
/tests/Umbraco.Tests.Integration/appsettings-schema.*.json

View File

@@ -16,7 +16,6 @@
</ItemGroup>
<ItemGroup>
<None Remove="appsettings-schema.json" />
<EmbeddedResource Include="appsettings-schema.json" />
</ItemGroup>
</Project>

View File

@@ -16,7 +16,7 @@
"type": "null"
},
{
"$ref": "appsettings-schema.umbraco.json#/definitions/JsonSchemaCmsDefinition"
"$ref": "appsettings-schema.Umbraco.Cms.json#/definitions/JsonSchemaCmsDefinition"
}
]
},
@@ -27,7 +27,7 @@
"type": "null"
},
{
"$ref": "appsettings-schema.umbraco.forms.json#/definitions/JsonSchemaFormsDefinition"
"$ref": "appsettings-schema.Umbraco.Forms.json#/definitions/JsonSchemaFormsDefinition"
}
]
},
@@ -38,7 +38,7 @@
"type": "null"
},
{
"$ref": "appsettings-schema.umbraco.deploy.json#/definitions/JsonSchemaDeployDefinition"
"$ref": "appsettings-schema.Umbraco.Deploy.json#/definitions/JsonSchemaDeployDefinition"
}
]
}

View File

@@ -11,8 +11,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" PrivateAssets="All" />
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" PrivateAssets="All" />
<ProjectReference Include="..\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup>
<PropertyGroup>

View File

@@ -14,36 +14,20 @@
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup>
<PropertyGroup>
<JsonSchemaPath>$(ProjectDir)appsettings-schema.json</JsonSchemaPath>
<JsonSchemaCmsPath>$(ProjectDir)appsettings-schema.umbraco.json</JsonSchemaCmsPath>
<JsonSchemaProjectPath>$(ProjectDir)../JsonSchema/</JsonSchemaProjectPath>
</PropertyGroup>
<ItemGroup>
<Content Include="buildTransitive\**" PackagePath="buildTransitive" />
<Content Include="$(JsonSchemaPath)" PackagePath="." />
<Content Include="$(JsonSchemaCmsPath)" PackagePath="." />
<Content Include="$(JsonSchemaPath)" PackagePath="" />
<Content Include="$(JsonSchemaCmsPath)" PackagePath="" />
</ItemGroup>
<Target Name="JsonSchemaBuild">
<Exec WorkingDirectory="$(JsonSchemaProjectPath)" Command="dotnet run -c Release --mainOutputFile &quot;../Umbraco.Cms.Targets/appsettings-schema.json&quot; --cmsOutputFile &quot;../Umbraco.Cms.Targets/appsettings-schema.umbraco.json&quot;" />
</Target>
<!-- Generate appsettings.json schema on build (and before copying to project) -->
<!-- Generate appsettings-schema.json on build (and before copying to project) -->
<PropertyGroup>
<JsonSchemaPath>$(MSBuildThisFileDirectory)appsettings-schema.json</JsonSchemaPath>
<JsonSchemaCmsPath>$(MSBuildThisFileDirectory)appsettings-schema.umbraco.json</JsonSchemaCmsPath>
<JsonSchemaCmsPath>$(MSBuildThisFileDirectory)appsettings-schema.Umbraco.Cms.json</JsonSchemaCmsPath>
<JsonSchemaProjectPath>$(MSBuildThisFileDirectory)..\JsonSchema\</JsonSchemaProjectPath>
</PropertyGroup>
<Target Name="GenerateAppsettingsSchema" BeforeTargets="Build;CopyAppsettingsSchema">
<Message Text="JsonSchemaPath: $(JsonSchemaPath)" Importance="high" />
<Message Text="JsonSchemaCmsPath: $(JsonSchemaCmsPath)" Importance="high" />
<Message Text="Skip JsonSchema generation because $(JsonSchemaPath) and $(JsonSchemaCmsPath) exists." Condition="Exists('$(JsonSchemaPath)') AND Exists('$(JsonSchemaCmsPath)')" />
<Message Text="Generate the appsettings json schema." Importance="high" Condition="!(Exists('$(JsonSchemaPath)') AND Exists('$(JsonSchemaCmsPath)'))" />
<CallTarget Targets="JsonSchemaBuild" Condition="!(Exists('$(JsonSchemaPath)') AND Exists('$(JsonSchemaCmsPath)'))" />
<Target Name="GenerateAppsettingsSchema" BeforeTargets="Build;CopyAppsettingsSchema" Condition="!Exists('$(JsonSchemaPath)') or !Exists('$(JsonSchemaCmsPath)')">
<Message Text="Generating appsettings-schema.json and appsettings-schema.Umbraco.Cms.json because it doesn't exist" Importance="high" />
<Exec WorkingDirectory="$(JsonSchemaProjectPath)" Command="dotnet run -c Release --mainOutputFile &quot;$(JsonSchemaPath)&quot; --cmsOutputFile &quot;$(JsonSchemaCmsPath)&quot;" />
</Target>
</Project>

View File

@@ -1,14 +1,11 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SchemaFilePath>$(MSBuildThisFileDirectory)..\appsettings-schema.json</SchemaFilePath>
</PropertyGroup>
<Target Name="CopyAppsettingsSchema" BeforeTargets="Build">
<ItemGroup>
<SchemaFile Include="$(SchemaFilePath)" />
<_SchemaFiles Include="$(MSBuildThisFileDirectory)..\appsettings-schema.json" />
<_SchemaFiles Include="$(MSBuildThisFileDirectory)..\appsettings-schema.Umbraco.Cms.json" />
</ItemGroup>
<Message Text="Copying appsettings.json schema file" Importance="high" />
<Copy SourceFiles="@(SchemaFile)" DestinationFolder="$(MSBuildProjectDirectory)" SkipUnchangedFiles="true" />
<Message Text="Copying appsettings-schema.json and appsettings-schema.Umbraco.Cms.json files" Importance="high" />
<Copy SourceFiles="@(_SchemaFiles)" DestinationFolder="$(MSBuildProjectDirectory)" SkipUnchangedFiles="true" />
</Target>
<Target Name="IncludeAppPluginsContent" BeforeTargets="GetCopyToOutputDirectoryItems;GetCopyToPublishDirectoryItems">

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco CMS</Title>
<Description>Installs Umbraco CMS with all default dependencies in your ASP.NET Core project.</Description>
@@ -11,13 +11,6 @@
<ProjectReference Include="..\Umbraco.Cms.Imaging.ImageSharp\Umbraco.Cms.Imaging.ImageSharp.csproj" />
<ProjectReference Include="..\Umbraco.Cms.Persistence.Sqlite\Umbraco.Cms.Persistence.Sqlite.csproj" />
<ProjectReference Include="..\Umbraco.Cms.Persistence.SqlServer\Umbraco.Cms.Persistence.SqlServer.csproj" />
<ProjectReference Include="..\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj" />
<ProjectReference Include="..\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<ProjectReference Include="..\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.csproj" />
</ItemGroup>
<!-- Generate appsettings.json schema on build (and before copying to project) -->

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>Umbraco.Cms.Core</PackageId>
<Title>Umbraco CMS - Core</Title>
@@ -21,6 +21,11 @@
<PackageReference Include="System.Runtime.Caching" Version="7.0.0-rc.2.*" />
<PackageReference Include="System.Runtime.Caching" Version="6.0.0" />
<!-- Add dependencies that we force an update to, even that we do not use them explicitly and they seems to be taken from the framework instead of from Nuget -->
<PackageReference Include="System.Runtime.Caching" Version="7.0.0-rc.1.22426.10" />
</ItemGroup>
<ItemGroup>
<!-- Update implicit dependencies to fix security issues, even though we do not use them explicitly and they are taken from the shared framework instead of NuGet -->
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />

View File

@@ -17,15 +17,6 @@
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
</ItemGroup>
<ItemGroup>
<Content Update="appsettings.*.json">
<DependentUpon>appsettings.json</DependentUpon>
</Content>
<Content Update="appsettings-schema.*.json">
<DependentUpon>appsettings-schema.json</DependentUpon>
</Content>
</ItemGroup>
<PropertyGroup>
<!-- Razor files are needed for the backoffice to work correctly -->
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
@@ -37,6 +28,15 @@
<RazorCompileOnPublish>false</RazorCompileOnPublish>
</PropertyGroup>
<ItemGroup>
<Content Update="appsettings.*.json">
<DependentUpon>appsettings.json</DependentUpon>
</Content>
<Content Update="appsettings-schema.*.json">
<DependentUpon>appsettings-schema.json</DependentUpon>
</Content>
</ItemGroup>
<Target Name="CopyAppsettingsTemplate" BeforeTargets="Build" Condition="!Exists('appsettings.json')">
<Message Text="Copying appsettings.template.json to appsettings.json because it doesn't exist" Importance="high" />
<Copy SourceFiles="appsettings.template.json" DestinationFiles="appsettings.json" />

View File

@@ -1,6 +0,0 @@
{
"name": "Umbraco.Web.UI",
"lockfileVersion": 2,
"requires": true,
"packages": {}
}

View File

@@ -27,6 +27,15 @@
<RazorCompileOnPublish>false</RazorCompileOnPublish>
</PropertyGroup>
<ItemGroup>
<Content Update="appsettings.*.json">
<DependentUpon>appsettings.json</DependentUpon>
</Content>
<Content Update="appsettings-schema.*.json">
<DependentUpon>appsettings-schema.json</DependentUpon>
</Content>
</ItemGroup>
<Import Project="..\PACKAGE_PROJECT_NAME_FROM_TEMPLATE\build\PACKAGE_PROJECT_NAME_FROM_TEMPLATE.targets" Condition="'$(PackageProjectName)' != ''" />
<ItemGroup Condition="'$(PackageProjectName)' != ''">
<ProjectReference Include="..\PACKAGE_PROJECT_NAME_FROM_TEMPLATE\PACKAGE_PROJECT_NAME_FROM_TEMPLATE.csproj" />