Files
radzen-blazor/Directory.Build.props
Atanas Korchev 5cd64c8ac9 Stop embedding sources/PDB in shipped WASM assemblies
Set EmbedAllSources=false and DebugType=portable in the root
Directory.Build.props so the demo and API-reference assemblies no longer
carry an embedded PDB containing full source. The embedded source is
deflate-compressed, so Brotli cannot reclaim it - it was inflating
RadzenBlazorDemos.wasm from ~1.3MB to ~4.2MB Brotli (and the lazy API
bundle similarly).

The packable Radzen.Blazor library is unaffected: it is governed by
Radzen.Blazor/Directory.Build.props and still ships embedded sources in
its .snupkg for consumer step-into-source debugging.
2026-06-22 13:17:34 +03:00

76 lines
3.0 KiB
XML

<Project>
<!--
Common build properties for all projects in the Radzen.Blazor solution.
To use this file:
1. Rename to Directory.Build.props (remove .sample extension)
2. Adjust settings based on your needs
3. Review the analyzer settings in .editorconfig
This file will be automatically imported by all projects in subdirectories.
-->
<PropertyGroup Label="Language Configuration">
<!-- Use latest C# language features -->
<LangVersion>latest</LangVersion>
<!-- Do NOT enable implicit usings - explicit imports preferred for library code -->
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoWarn>CA2007</NoWarn>
</PropertyGroup>
<PropertyGroup Label="Code Analysis Configuration">
<!-- Enable .NET code analyzers -->
<AnalysisLevel>latest</AnalysisLevel>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<!-- Run analyzers during build and in IDE -->
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<!-- Enforce code style rules at build (e.g. csharp_prefer_braces). -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<!-- Don't treat warnings as errors (yet) - too many to fix immediately -->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<!-- Report all analyzer diagnostics -->
<AnalysisMode>All</AnalysisMode>
</PropertyGroup>
<PropertyGroup Label="Build Quality">
<!-- Enable deterministic builds for reproducibility -->
<Deterministic>true</Deterministic>
<!-- Enable deterministic builds in CI/CD -->
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
<!-- Apps/tests/tools ship the DLL itself; embedded source can't be Brotli-recompressed and bloats the
shipped .wasm (~3.5 MB on RadzenBlazorDemos). Portable PDBs aid local debugging but are not published
in a Release Blazor WASM build. snupkg source-embedding lives in Radzen.Blazor/Directory.Build.props. -->
<EmbedAllSources>false</EmbedAllSources>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Label="Demos and Tests Project Configuration" Condition="$(MSBuildProjectName.Contains('Demos')) OR $(MSBuildProjectName.Contains('Tests'))">
<!-- Demo projects and Tests should not be packable -->
<IsPackable>false</IsPackable>
<!-- DISABLE ALL ANALYZERS FOR DEMO PROJECTS AND TESTS -->
<EnableNETAnalyzers>false</EnableNETAnalyzers>
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Label="Performance">
<!-- Optimize startup time -->
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
</PropertyGroup>
</Project>