Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/build-core-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ env:
./src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
./src/Charts/Microsoft.FluentUI.AspNetCore.Components.Charts.csproj
./src/Tools/McpServer/Microsoft.FluentUI.AspNetCore.McpServer.csproj
./src/Extensions/DataGrid.ODataAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.ODataAdapter.csproj
./src/Extensions/DataGrid.EntityFrameworkAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter.csproj
./src/Templates/Microsoft.FluentUI.AspNetCore.Templates.csproj
TESTS: >
./tests/Core/Components.Tests.csproj
./tests/Tools/McpServer.Tests/Microsoft.FluentUI.AspNetCore.McpServer.Tests.csproj
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<!-- Versioning -->
<VersionFile>5.0.0</VersionFile>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>RC.3</VersionSuffix>
<VersionSuffix>RC.4</VersionSuffix>

<Authors>Microsoft</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
Expand Down
80 changes: 53 additions & 27 deletions _PublishDemoLocally.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,36 @@ if ($publishChoice -eq "n") {
# Clean previous build artifacts
Write-Host "👉 Cleaning previous build artifacts (bin and obj)..." -ForegroundColor Yellow

dotnet clean Microsoft.FluentUI-v5.slnx

if (Test-Path "./examples/Demo/FluentUI.Demo/bin") {
Remove-Item -Path "./examples/Demo/FluentUI.Demo/bin" -Recurse -Force
}

if (Test-Path "./examples/Demo/FluentUI.Demo/obj") {
Remove-Item -Path "./examples/Demo/FluentUI.Demo/obj" -Recurse -Force
}

if (Test-Path "./src/Core/bin/") {
Remove-Item -Path "./src/Core/bin" -Recurse -Force
# Remove bin/obj folders directly instead of running 'dotnet clean'.
# A solution-level 'dotnet clean' requires a valid restore (project.assets.json) that
# matches the current target frameworks; if a previous build restored a different set
# of frameworks it fails with NETSDK1005. Deleting the folders is deterministic and
# immune to restore-state mismatches.
$artifactPaths = @(
"./examples/Demo/FluentUI.Demo/bin",
"./examples/Demo/FluentUI.Demo/obj",
"./examples/Demo/FluentUI.Demo.Client/bin",
"./examples/Demo/FluentUI.Demo.Client/obj",
"./examples/Tools/FluentUI.Demo.DocApiGen/bin",
"./examples/Tools/FluentUI.Demo.DocApiGen/obj",
"./src/Core/bin",
"./src/Core/obj",
"./src/Charts/bin",
"./src/Charts/obj",
"./src/Tools/McpServer/bin",
"./src/Tools/McpServer/obj"
)

foreach ($artifactPath in $artifactPaths) {
if (Test-Path $artifactPath) {
Remove-Item -Path $artifactPath -Recurse -Force
}
}

if (Test-Path "./src/Core/obj/") {
Remove-Item -Path "./src/Core/obj" -Recurse -Force
}
# Remove generated MCP documentation JSON files so they are regenerated during the build
Remove-Item -Path "./src/Tools/McpServer/FluentUIComponentsDocumentation.json", `
"./src/Tools/McpServer/all-icons.json", `
"./src/Tools/McpServer/chart-comments.json" -Force -ErrorAction SilentlyContinue

$RootDir = $PSScriptRoot

Expand Down Expand Up @@ -103,6 +116,17 @@ if ($node.InnerText -ne $NetVersion) {
$xml.Save($resolvedPath)
}

# Process ExampleNetVersion
$node = $xml.SelectSingleNode("//ExampleNetVersion")
if ($null -eq $node) {
throw "Matching ExampleNetVersion element not found."
}
if ($node.InnerText -ne $NetVersion) {
$node.InnerText = $NetVersion
Write-Host "Updated ExampleNetVersion temporarily." -ForegroundColor Cyan
$xml.Save($resolvedPath)
}

# Process TargetNetVersions
$nodes = $xml.SelectNodes("//TargetNetVersions")
$node = $nodes |
Expand All @@ -120,28 +144,30 @@ if ($node.InnerText -ne $NetVersion) {
}

if ($fullBuild) {
# Build the core project
# Build the Core and Charts projects to their DEFAULT output locations.
# The MCP Server build runs a documentation-generation target that loads these
# assemblies via an AssemblyDependencyResolver, so it requires the assembly,
# its .deps.json and its .xml files to exist at bin/<Configuration>/<NetVersion>.
Write-Host "👉 Building Core project..." -ForegroundColor Yellow
dotnet build "./src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj" -c Release -o "./src/Core/bin/Publish" -f $NetVersion
dotnet build "./src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj" -c Release -f $NetVersion

# Copy Core build output to default location (so MCP Server project can resolve the dependency)
$defaultCoreOutput = "./src/Core/bin/Release/$NetVersion"
if (-not (Test-Path $defaultCoreOutput)) {
New-Item -ItemType Directory -Path $defaultCoreOutput -Force | Out-Null
}
Copy-Item -Path "./src/Core/bin/Publish/*" -Destination $defaultCoreOutput -Recurse -Force
Write-Host "👉 Building Charts project..." -ForegroundColor Yellow
dotnet build "./src/Charts/Microsoft.FluentUI.AspNetCore.Components.Charts.csproj" -c Release -f $NetVersion

# Build the DocApiGen project (must exist for the MCP Server build to run it with --no-build)
Write-Host "👉 Building DocApiGen project..." -ForegroundColor Yellow
dotnet build ".\examples\Tools\FluentUI.Demo.DocApiGen\FluentUI.Demo.DocApiGen.csproj" -c Release -f $NetVersion

# Build the MCP Server project
Write-Host "👉 Building MCP Server project..." -ForegroundColor Yellow
dotnet build "./src/Tools/McpServer/Microsoft.FluentUI.AspNetCore.McpServer.csproj" -c Release -o "./src/Tools/McpServer/bin/Publish" -f $NetVersion

# Build the DocApiGen project
Write-Host "👉 Building DocApiGen project..." -ForegroundColor Yellow
dotnet build ".\examples\Tools\FluentUI.Demo.DocApiGen\FluentUI.Demo.DocApiGen.csproj" -c Release -f $NetVersion
# Location of the Core build output used by the documentation generator
$coreOutput = "$RootDir/src/Core/bin/Release/$NetVersion"

# Generate API documentation file
Write-Host "👉 Generating API documentation..." -ForegroundColor Yellow
dotnet run -c Release --project ".\examples\Tools\FluentUI.Demo.DocApiGen\FluentUI.Demo.DocApiGen.csproj" --xml "$RootDir/src/Core/bin/Publish/Microsoft.FluentUI.AspNetCore.Components.xml" --dll "$RootDir/src/Core/bin/Publish/Microsoft.FluentUI.AspNetCore.Components.dll" --output "$RootDir/examples/Demo/FluentUI.Demo.Client/wwwroot/api-comments.json" --format json -f $NetVersion
dotnet run -c Release --project ".\examples\Tools\FluentUI.Demo.DocApiGen\FluentUI.Demo.DocApiGen.csproj" --xml "$coreOutput/Microsoft.FluentUI.AspNetCore.Components.xml" --dll "$coreOutput/Microsoft.FluentUI.AspNetCore.Components.dll" --output "$RootDir/examples/Demo/FluentUI.Demo.Client/wwwroot/api-comments.json" --format json -f $NetVersion

# Generate MCP documentation file
Write-Host "👉 Generating MCP documentation..." -ForegroundColor Yellow
Expand Down
5 changes: 5 additions & 0 deletions eng/pipelines/build-all-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ parameters:
**/Microsoft.FluentUI.AspNetCore.Components.csproj
**/Microsoft.FluentUI.AspNetCore.Components.Charts.csproj
**/Microsoft.FluentUI.AspNetCore.McpServer.csproj
**/Microsoft.FluentUI.AspNetCore.Components.DataGrid.ODataAdapter.csproj
**/Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter.csproj
**/Microsoft.FluentUI.AspNetCore.Templates.csproj
**/Components.Icons.Package.csproj
**/Components.Emoji.Package.csproj

- name: Tests # List of Unit-Test projects to run
default: |
Expand Down
3 changes: 3 additions & 0 deletions eng/pipelines/build-core-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ parameters:
**/Microsoft.FluentUI.AspNetCore.Components.csproj
**/Microsoft.FluentUI.AspNetCore.Components.Charts.csproj
**/Microsoft.FluentUI.AspNetCore.McpServer.csproj
**/Microsoft.FluentUI.AspNetCore.Components.DataGrid.ODataAdapter.csproj
**/Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter.csproj
**/Microsoft.FluentUI.AspNetCore.Templates.csproj

- name: Tests # List of Unit-Test projects to run
default: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
title: Migration Guide V4 → V5
order: 0020
route: /Migration
category: 10|Get Started
icon: WrenchScrewdriver
hidden: false
---

# Migration Guide V4 → V5

This guide helps you migrate from **Fluent UI Blazor V4** to **V5**.
Each page below covers specific component changes, removed components, and new additions.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ order: 0020
category: 10|Get Started
route: /MigrationV5
icon: WrenchScrewdriver
hidden: true
---

# Changes introduced in this version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@
<None Include="**\*.ts" />
</ItemGroup>

<!--
tsconfig.json is a build-time TypeScript configuration. The StaticWebAssets SDK
includes it as Content with CopyToPublishDirectory=PreserveNewest, so it flows to
a consuming app's publish output at the root. When more than one referenced library
(e.g. Core and Charts) does this, the duplicate root-level tsconfig.json triggers
NETSDK1152. Exclude it from the output and publish directories.
-->
<ItemGroup>
<Content Update="tsconfig.json" CopyToOutputDirectory="Never" CopyToPublishDirectory="Never" />
<None Update="tsconfig.json" CopyToOutputDirectory="Never" CopyToPublishDirectory="Never" />
</ItemGroup>

<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
Expand Down
14 changes: 13 additions & 1 deletion src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@
<None Include="**\*.ts" />
</ItemGroup>

<!--
tsconfig.json is a build-time TypeScript configuration. The StaticWebAssets SDK
includes it as Content with CopyToPublishDirectory=PreserveNewest, so it flows to
a consuming app's publish output at the root. When more than one referenced library
(e.g. Core and Charts) does this, the duplicate root-level tsconfig.json triggers
NETSDK1152. Exclude it from the output and publish directories.
-->
<ItemGroup>
<Content Update="tsconfig.json" CopyToOutputDirectory="Never" CopyToPublishDirectory="Never" />
<None Update="tsconfig.json" CopyToOutputDirectory="Never" CopyToPublishDirectory="Never" />
</ItemGroup>

<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
Expand Down Expand Up @@ -96,7 +108,7 @@
</PropertyGroup>

<!-- Copy XML files to the Demo project (to generate the API documentation) -->
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(TargetFramework)' == '$(NetVersion)'">
<ItemGroup>
<XmlFiles Include="$(ProjectDir)bin\$(Configuration)\$(NetVersion)\*.xml" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<IsShipping>true</IsShipping>
<Optimize>True</Optimize>
<NoWarn>1701;1702;8669;1591</NoWarn>
<NoWarn>$(NoWarn);1701;1702;8669;1591;NU5128</NoWarn>
<DebuggerSupport>false</DebuggerSupport>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>$(SolutionDir)artifacts</PackageOutputPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@
<!-- Build the FluentUI Components first to ensure DLL and XML exist -->
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\Core\Microsoft.FluentUI.AspNetCore.Components.csproj" Targets="Build" Properties="Configuration=$(Configuration)" />

<!-- Build the FluentUI Charts to ensure the Charts DLL and XML exist -->
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\Charts\Microsoft.FluentUI.AspNetCore.Components.Charts.csproj" Targets="Build" Properties="Configuration=$(Configuration)" />

<!-- Restore and Build DocApiGen -->
<MSBuild Projects="$(DocApiGenProject)" Targets="Restore" Properties="Configuration=$(Configuration);TargetFramework=$(ExampleNetVersion)" />
<MSBuild Projects="$(DocApiGenProject)" Targets="Build" Properties="Configuration=$(Configuration);TargetFramework=$(ExampleNetVersion)" />
Expand Down
Loading