Files
Umbraco-CMS/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
2025-11-24 16:32:38 +01:00

75 lines
3.9 KiB
XML

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<RootNamespace>Umbraco.Cms.Web.UI</RootNamespace>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
<!-- Disable compression for static files, because MapStaticAssets() is not used anyway (yet) -->
<CompressionEnabled>false</CompressionEnabled>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>
<PropertyGroup>
<!--
TODO: Fix and remove overrides:
[SA1119] Correct unnecessary parenthesis
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),SA1119</WarningsNotAsErrors>
</PropertyGroup>
<Import Project="..\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.props" />
<Import Project="..\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.targets" />
<ItemGroup>
<ProjectReference Include="..\Umbraco.Cms.DevelopmentMode.Backoffice\Umbraco.Cms.DevelopmentMode.Backoffice.csproj" />
<ProjectReference Include="..\Umbraco.Cms\Umbraco.Cms.csproj" />
</ItemGroup>
<ItemGroup>
<!-- Add design/build time support for EF Core migrations -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" PrivateAssets="all" Version="10.0.0" />
<!--
Added the following direct dependency due to Microsoft.EntityFrameworkCore.Design having a dependency on an insecure version.
Review for removal when Microsoft.EntityFrameworkCore.Design is updated to a newer version.
-->
<PackageReference Include="Microsoft.Build.Tasks.Core" PrivateAssets="all" Version="17.14.28" />
</ItemGroup>
<ItemGroup>
<!-- Ensure the AppLocalIcu setting is the same as the referenced ICU package version and changes are also done to the template project! -->
<!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" />
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.3" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
</ItemGroup>
<PropertyGroup>
<!-- Razor files are needed for the backoffice to work correctly -->
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
</PropertyGroup>
<PropertyGroup>
<!-- Remove RazorCompileOnBuild and RazorCompileOnPublish when not using ModelsMode InMemoryAuto -->
<RazorCompileOnBuild>false</RazorCompileOnBuild>
<RazorCompileOnPublish>false</RazorCompileOnPublish>
</PropertyGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="umbraco\UmbracoInstall\Index.cshtml" />
<_ContentIncludedByDefault Remove="umbraco\UmbracoLogin\Index.cshtml" />
<_ContentIncludedByDefault Remove="umbraco\UmbracoBackOffice\Default.cshtml" />
</ItemGroup>
<ItemGroup>
<!-- Hide the content files that come from the Microsoft.CodeAnalysis.Workspaces.MSBuild package. -->
<Content Update="$(NuGetPackageRoot)\microsoft.codeanalysis.workspaces.msbuild\**\**" Visible="false" />
</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" />
</Target>
<Target Name="CopyAppsettingsDevelopmentTemplate" BeforeTargets="Build" Condition="!Exists('appsettings.Development.json')">
<Message Text="Copying appsettings.Development.template.json to appsettings.Development.json because it doesn't exist" Importance="high" />
<Copy SourceFiles="appsettings.Development.template.json" DestinationFiles="appsettings.Development.json" />
</Target>
</Project>