dotnet-sdk-9.0.100-preview.7.24379.15] Fail to build blazor-starter-kit app with an error "CS0619:'MudMenu.OffsetY' is obsolete: 'Use AnchorOrigin or TransformOrigin instead.'"
We are doing Application compatibility testing with this application against the latest .NET 9 SDK. When build the application with the latest .NET 9 SDK, it failed with error: CS0619:'MudMenu.OffsetY' is obsolete: 'Use AnchorOrigin or TransformOrigin instead.
After the investigation, these are obsoletions in MudBlazor itself. The app is using properties that have been deprecated
You can fix the obsoletions by upgrade MudBlazor to V7.5.0 or above if you want
Test steps
- cd to CleanArchitecture2\src\Server folder.
- Build app with 9.0.100-preview.7.24379.15 SDK
Expected Result:
build successfully without error
Actual Result:
build failed with CS0619:'MudMenu.OffsetY' is obsolete: 'Use AnchorOrigin or TransformOrigin instead`
Please refer to more information from https://github.com/dotnet/sdk/issues/42509
I just tested today; it is due to commit on Jan 19, 2022: Updating MudBlazor Version="5.1.4" to 6.0.2 https://github.com/fullstackhero/blazor-starter-kit/commit/776f486611c929ec882d1e74336e41fa4ac0c1e8 https://github.com/MudBlazor/MudBlazor/releases/tag/v6.0.2
MudBlazor 6.0.2 Breaking Changes
Framework: Moved to .NET 6 Obsolete Parameters: Obsolete marked parameters will now fail your build instead of warning. Next release they will be removed completely from the library.
Tested using MudBlazor 6.0.2 Using .NET 9 SDK 9.0.102 we simply have build error, cannot run app. Using .NET 6-8 SDK:
- Build success, app can be run.
- Build + Intellisense -> show errors (obsolete attribute)
- Application can be run, no error in the affected pages on runtime.
Simply updating the NuGet package to MudBlazor V7.5.0 won't fix this error by itself. There are breaking changes that you must resolve.