Skip to content

Commit d697f8c

Browse files
Merge pull request #6272 from syncfusion-content/964808-Remove-TFM
964808: Remove net6 and net7 reference
2 parents ea7ed68 + c19b245 commit d697f8c

File tree

7 files changed

+31
-190
lines changed

7 files changed

+31
-190
lines changed

blazor/common/adding-script-references.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ N> The javascript interop files needs to be added to support the features that c
1717

1818
You can refer the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor scripts through the CDN resources.
1919

20-
* For **Blazor Web App**, reference scripts in `~/Components/App.razor` file.
21-
* For **Blazor WASM App**, reference scripts in `~/wwwroot/index.html` file.
22-
* For **Blazor Server App**, reference scripts in `~/Pages/_Layout.cshtml` file for `.NET 6` project and in `~/Pages/_Host.cshtml` file for `.NET 7` project.
20+
* For **.NET 8 and .NET 9** Blazor Web Apps using any render mode (Server, WebAssembly, or Auto), reference scripts in `~/Components/App.razor` file.
21+
* For **Blazor WASM Standalone App**, reference scripts in `~/wwwroot/index.html` file.
2322

2423
Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are available in CDN for each version. Make sure that the version in the URLs matches the version of the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Package you are using .
2524

@@ -448,7 +447,7 @@ The following table lists components and its script reference.
448447

449448
## Custom Resource Generator
450449

451-
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor provides an option to generate a component's interop scripts using the [Custom Resource Generator](https://blazor.syncfusion.com/crg/) (CRG) tool for the Blazor components. Refer [here to generate the component-wise scripts externally using CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator).
450+
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor provides an option to generate a component's interop scripts using the [Custom Resource Generator](https://blazor.syncfusion.com/crg) (CRG) tool for the Blazor components. Refer [here to generate the component-wise scripts externally using CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator).
452451

453452
## See also
454453

blazor/common/cdn-fallback.md

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This section provides information about how to refer fallback [scripts](https://
1313

1414
## Blazor Web App
1515

16-
For Blazor Web app, refer the script and style sheet fallback from [Static Web Assets](https://blazor.syncfusion.com/documentation/common/adding-script-references#static-web-assets) inside the Script tag like below.
16+
For **.NET 8 and .NET 9** Blazor Web Apps using any render mode (Server, WebAssembly, or Auto), refer the script and style sheet fallback from [Static Web Assets](https://blazor.syncfusion.com/documentation/common/adding-script-references#static-web-assets) inside the Script tag like below.
1717

1818
### Script fallback
1919

@@ -56,35 +56,9 @@ You can refer the theme stylesheet inside the `<head>` of **~/Components/App.raz
5656
{% endhighlight %}
5757
{% endtabs %}
5858

59-
## Blazor Server App
59+
## Blazor WebAssembly Standalone App
6060

61-
CDN links can be down by connection issues or some other problems. This will cause the site looks broken. Follow the below steps to resolve these issues in the Blazor application.
62-
63-
If you are using CDN for style sheet references then you have to add style sheet fallback from [Static Web Assets](https://blazor.syncfusion.com/documentation/common/adding-script-references#static-web-assets) by using the [link tag helper](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/built-in/link-tag-helper?view=aspnetcore-7.0). Syncfusion<sup style="font-size:70%">&reg;</sup> theme provides the `e-control` class. You can check the style from provided class by using link tag helper property.
64-
65-
* **~/Pages/_Host.cshtml** file for **.NET 7**.
66-
* **~/Pages/_Layout.cshtml** for **.NET 6**.
67-
68-
{% tabs %}
69-
{% highlight cshtml %}
70-
71-
<head>
72-
...
73-
<link rel="stylesheet" href="https://cdn.syncfusion.com/blazor/{{ site.blazorversion }}/styles/bootstrap5.css"
74-
asp-fallback-href="_content/Syncfusion.Blazor.Themes/bootstrap5.css"
75-
asp-fallback-test-class="e-control"
76-
asp-fallback-test-property="font-size"
77-
asp-fallback-test-value="12px" />
78-
</head>
79-
80-
{% endhighlight %}
81-
{% endtabs %}
82-
83-
N> Alternately, fallback links can be provided using [script fallback](#script-fallback) and [style sheet fallback](#style-sheet-fallback) in blazor server app.
84-
85-
## Blazor WebAssembly App
86-
87-
For Blazor WebAssembly app, refer the script and style sheet fallback from [Static Web Assets](https://blazor.syncfusion.com/documentation/common/adding-script-references#static-web-assets) inside the Script tag like below.
61+
For Blazor WebAssembly Standalone app, refer the script and style sheet fallback from [Static Web Assets](https://blazor.syncfusion.com/documentation/common/adding-script-references#static-web-assets) inside the Script tag like below.
8862

8963
### Script fallback
9064

blazor/common/content-security-policy.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ To use Syncfusion<sup style="font-size:70%">&reg;</sup> blazor components with s
2222

2323
These directives should be included in the `<head>` tag of the application's webpage, typically
2424

25-
* For **Blazor Web App**, inside the `<head>` of **~/Components/App.razor** file.
26-
* For **Blazor Server application**, inside the `<head>` of
27-
* **~/Pages/_Host.cshtml** file for .NET 7.
28-
* **~/Pages/_Layout.cshtml** for .NET 6.
29-
* For **Blazor WebAssembly App**, inside the `<head>` of **wwwroot/index.html** file.
25+
* For **.NET 8 and .NET 9** Blazor Web Apps using any render mode (Server, WebAssembly, or Auto), inside the `<head>` of **~/Components/App.razor** file.
26+
27+
* For **Blazor WebAssembly Standalone App**, inside the `<head>` of **wwwroot/index.html** file.
3028

3129
{% tabs %}
3230
{% highlight c# hl_lines="9 10" %}

blazor/common/custom-resource-generator.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99

1010
# Custom Resource Generator
1111

12-
Syncfusion<sup style="font-size:70%">&reg;</sup> provides an option to generate a component's interop script and styles using the [Custom Resource Generator](https://blazor.syncfusion.com/crg/) (CRG) web tool for Blazor components from v19.2.0.44. This tool empowers users by generating precise interop scripts and styles specifically for their components. By leveraging the CRG, you can optimize loading times and enhance responsiveness compared to loading overall script and style resources.
12+
Syncfusion<sup style="font-size:70%">&reg;</sup> provides an option to generate a component's interop script and styles using the [Custom Resource Generator](https://blazor.syncfusion.com/crg) (CRG) web tool for Blazor components from v19.2.0.44. This tool empowers users by generating precise interop scripts and styles specifically for their components. By leveraging the CRG, you can optimize loading times and enhance responsiveness compared to loading overall script and style resources.
1313

1414
![Custom resource generator preview for Blazor](images/custom-resource-generator-preview.png)
1515

@@ -19,9 +19,9 @@ Search and select the required Syncfusion<sup style="font-size:70%">&reg;</sup>
1919

2020
Refer to the following steps to search and select the components in CRG:
2121

22-
1. Open [Syncfusion<sup style="font-size:70%">&reg;</sup> Custom Resource Generator](https://blazor.syncfusion.com/crg/) (CRG) application.
22+
1. Open [Syncfusion<sup style="font-size:70%">&reg;</sup> Custom Resource Generator](https://blazor.syncfusion.com/crg) (CRG) application.
2323
2. Type the required component name in the search bar, and then select the checkbox. The dependency of the selected component is resolved in the application itself, so you do not need to choose each dependent component manually.
24-
![Search and select Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor UI components](images/search-non-injectable.png)
24+
![Search and select Syncfusion Blazor UI components](images/search-non-injectable.png)
2525
3. Select the required built-in themes from the **Select Themes** option. This provides an option to select more than one theme.
2626
![Select the built-in themes in Blazor](images/select-inbuilt-themes.png)
2727

@@ -47,11 +47,8 @@ N> When you download the resources of Material and Tailwind themes, either separ
4747

4848
1. Copy and paste the downloaded custom resources in the Blazor application `~/wwwroot` folder.
4949
2. Now, manually add the custom interop script and styles in the Blazor App.
50-
* For **Blazor Web App**, reference custom interop script in `~/Components/App.razor` file.
51-
* For **Blazor WASM App**, reference custom interop script in `~/wwwroot/index.html` file.
52-
* For **Blazor Server App**, reference custom interop script in
53-
* `~/Pages/_Layout.cshtml` file for `.NET 6` project
54-
* `~/Pages/_Host.cshtml` file for `.NET 7` project.
50+
* For **.NET 8 and .NET 9** Blazor Web Apps using any render mode (Server, WebAssembly, or Auto), reference custom interop script in `~/Components/App.razor` file.
51+
* For **Blazor WASM Standalone App**, reference custom interop script in `~/wwwroot/index.html` file.
5552

5653
```html
5754
<head>

blazor/common/data-binding/sql-server-data-binding.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The following software are needed:
1919

2020
* Microsoft.EntityFrameworkCore.SqlServer
2121
* Visual Studio 2022
22-
* .NET 6.0 or later.
22+
* .NET 8.0 or later.
2323

2424
## Create the database
2525

@@ -413,12 +413,9 @@ Themes provide life to components. Syncfusion<sup style="font-size:70%">&reg;</s
413413

414414
In this demo application, the latest theme will be used.
415415

416-
* For **Blazor Web App**, refer stylesheet inside the `<head>` of **~/Components/App.razor** file for .NET 8 and .NET 9.
416+
* For **.NET 8 and .NET 9** Blazor Web Apps using any render mode (Server, WebAssembly, or Auto), refer stylesheet inside the `<head>` of **~/Components/App.razor** .
417417

418418
* For **Blazor WebAssembly application**, refer stylesheet inside the `<head>` element of **wwwroot/index.html** file.
419-
* For **Blazor Server application**, refer stylesheet inside the `<head>` element of
420-
* **~/Pages/_Host.cshtml** file for .NET 7.
421-
* **~/Pages/_Layout.cshtml** file for .NET 6.
422419

423420
{% highlight cshtml %}
424421

blazor/common/localization.md

Lines changed: 10 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ In Blazor Web App and Blazor WASM app, you can set culture statically in Blazor'
103103

104104
The app's culture can be set in JavaScript by setting `applicationCulture` in Blazor's start option by following the steps below,
105105

106-
* For `Blazor Web App`, prevent Blazor autostart by adding `autostart="false"` attribute to the Blazor `<script>` tag in the **~/Components/App.razor** file.
106+
* For **.NET 8 and .NET 9** Blazor Web Apps using any render mode (Server, WebAssembly, or Auto), prevent Blazor autostart by adding `autostart="false"` attribute to the Blazor `<script>` tag in the **~/Components/App.razor** file.
107107

108-
* For `Blazor WebAssembly App` , prevent Blazor autostart by adding `autostart="false"` attribute to Blazor's `<script>` tag in the **wwwroot/index.html** file.
108+
* For `Blazor WebAssembly Standalone App` , prevent Blazor autostart by adding `autostart="false"` attribute to Blazor's `<script>` tag in the **wwwroot/index.html** file.
109109

110110
{% tabs %}
111111

@@ -119,7 +119,7 @@ The app's culture can be set in JavaScript by setting `applicationCulture` in Bl
119119

120120
{% endhighlight %}
121121

122-
{% highlight cshtml tabtitle="Blazor WASM App" %}
122+
{% highlight cshtml tabtitle="Blazor WASM Standalone App" %}
123123

124124
<body>
125125
...
@@ -150,7 +150,7 @@ The app's culture can be set in JavaScript by setting `applicationCulture` in Bl
150150
</body>
151151

152152
{% endhighlight %}
153-
{% highlight cshtml tabtitle="Blazor WASM App" hl_lines="4 5 6 7 8" %}
153+
{% highlight cshtml tabtitle="Blazor WASM Standalone App" hl_lines="4 5 6 7 8" %}
154154

155155
<body>
156156
...
@@ -184,22 +184,6 @@ CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("de-DE");
184184

185185
{% endtabs %}
186186

187-
### Blazor Server App
188-
189-
* For **.NET 6 & .NET 7** app, specify the static culture in **~/Program.cs** file.
190-
191-
{% tabs %}
192-
193-
{% highlight c# tabtitle=".NET 6 & .NET 7 (~/Program.cs)" hl_lines="3" %}
194-
195-
...
196-
var app = builder.Build();
197-
app.UseRequestLocalization("de-DE");
198-
...
199-
200-
{% endhighlight %}
201-
202-
{% endtabs %}
203187

204188
### MAUI Blazor App
205189

@@ -224,9 +208,9 @@ CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("de-DE");
224208

225209
The culture can be set dynamically based on user's preference. The following example demonstrates how to use a localization cookie to store user's localization preference.
226210

227-
### Blazor Web App and Blazor WASM App
211+
### Blazor Web App and Blazor Standalone WASM App
228212

229-
For `Blazor Web App and Blazor WASM App`, set the `BlazorWebAssemblyLoadAllGlobalizationData` property to true in the project file:
213+
For `Blazor Web App and Blazor WASM Standalone App`, set the `BlazorWebAssemblyLoadAllGlobalizationData` property to true in the project file:
230214

231215
{% tabs %}
232216

@@ -240,9 +224,9 @@ For `Blazor Web App and Blazor WASM App`, set the `BlazorWebAssemblyLoadAllGloba
240224

241225
{% endtabs %}
242226

243-
* For Blazor Web App, add JS function in `~/Components/App.razor` file (after Blazor's `<script>` tag and before the closing `</body>`), to get and set the user's selected culture in the browser local storage.
227+
* For **.NET 8 and .NET 9** Blazor Web Apps using any render mode (Server, WebAssembly, or Auto), add JS function in `~/Components/App.razor` file (after Blazor's `<script>` tag and before the closing `</body>`), to get and set the user's selected culture in the browser local storage.
244228

245-
* For Blazor WASM App, add JS function in `wwwroot/index.html` file (after Blazor's `<script>` tag and before the closing `</body>`), to get and set the user's selected culture in the browser local storage.
229+
* For Blazor WASM Standalone App, add JS function in `wwwroot/index.html` file (after Blazor's `<script>` tag and before the closing `</body>`), to get and set the user's selected culture in the browser local storage.
246230

247231
{% tabs %}
248232
{% highlight cshtml tabtitle="Blazor Web App" hl_lines="2 3 4 5 6 7" %}
@@ -374,7 +358,7 @@ Add the `CultureSwitcher` component to `~/MainLayout.razor` to enable the cultur
374358
</div>
375359

376360
{% endhighlight %}
377-
{% highlight razor tabtitle="Blazor WASM App" %}
361+
{% highlight razor tabtitle="Blazor WASM Standalone App" %}
378362

379363
<div class="page">
380364
....
@@ -398,46 +382,6 @@ If you create a Blazor Web App with an **Interactive render mode** as `Server` m
398382

399383
{% tabs %}
400384

401-
{% highlight c# tabtitle=".NET 6 & .NET 7 (~/Program.cs)" hl_lines="7 11 13 14 15 16 17 20 31" %}
402-
403-
var builder = WebApplication.CreateBuilder(args);
404-
405-
// Add services to the container.
406-
builder.Services.AddRazorPages();
407-
builder.Services.AddServerSideBlazor();
408-
builder.Services.AddSingleton<WeatherForecastService>();
409-
builder.Services.AddControllers();
410-
411-
builder.Services.AddSyncfusionBlazor();
412-
//Register the Syncfusion locale service to localize Syncfusion Blazor components.
413-
builder.Services.AddSingleton(typeof(ISyncfusionStringLocalizer), typeof(SyncfusionLocalizer));
414-
415-
var supportedCultures = new[] { "en-US", "de-DE", "fr-FR", "ar-AE", "zh-HK" };
416-
var localizationOptions = new RequestLocalizationOptions()
417-
.SetDefaultCulture(supportedCultures[0])
418-
.AddSupportedCultures(supportedCultures)
419-
.AddSupportedUICultures(supportedCultures);
420-
421-
var app = builder.Build();
422-
app.UseRequestLocalization(localizationOptions);
423-
// Configure the HTTP request pipeline.
424-
if (!app.Environment.IsDevelopment())
425-
{
426-
app.UseExceptionHandler("/Error");
427-
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
428-
app.UseHsts();
429-
}
430-
app.UseHttpsRedirection();
431-
app.UseStaticFiles();
432-
app.UseRouting();
433-
app.MapControllers();
434-
app.MapBlazorHub();
435-
app.MapFallbackToPage("/_Host");
436-
437-
app.Run();
438-
439-
{% endhighlight %}
440-
441385
{% highlight c# tabtitle=".NET 9 & .NET 8 (~/Program.cs)" hl_lines="4 6 7 8 9 10 13 24" %}
442386

443387
builder.Services.AddControllers();
@@ -472,27 +416,9 @@ app.Run();
472416
{% endhighlight %}
473417
{% endtabs %}
474418

475-
For .NET 6 and 7 set the current culture in a cookie immediately after opening <body> tag of `Pages/_Host.cshtml`.
476-
477419
For .NET 9 and .NET 8 set the current culture in a cookie in App component file
478420

479421
{% tabs %}
480-
{% highlight c# tabtitle=".NET 6 & .NET 7 (_Host.cshtml)" hl_lines="6 7 8 9 10 11" %}
481-
482-
@using Microsoft.AspNetCore.Http
483-
@using Microsoft.AspNetCore.Localization
484-
@using System.Globalization
485-
@{
486-
487-
HttpContext.Response.Cookies.Append(
488-
CookieRequestCultureProvider.DefaultCookieName,
489-
CookieRequestCultureProvider.MakeCookieValue(
490-
new RequestCulture(
491-
CultureInfo.CurrentCulture,
492-
CultureInfo.CurrentUICulture)));
493-
}
494-
495-
{% endhighlight %}
496422

497423
{% highlight C# tabtitle=".NET 9 & .NET 8 (App.razor)" %}
498424

@@ -550,7 +476,7 @@ Create `CultureSwitcher` component and place it inside shared folder to perform
550476

551477
{% tabs %}
552478

553-
{% highlight razor tabtitle=".NET 6 & .NET 7 (Shared/CultureSwitcher.razor) .NET 9 & .NET 8 (Components/Pages/CultureSwitcher.razor)" %}
479+
{% highlight razor tabtitle=".NET 9 & .NET 8 (Components/Pages/CultureSwitcher.razor)" %}
554480

555481
@using System.Globalization
556482
@inject NavigationManager NavigationManager
@@ -612,27 +538,6 @@ Add the `CultureSwitcher` component to `Shared/MainLayout.razor` to enable the c
612538

613539
{% tabs %}
614540

615-
{% highlight razor tabtitle=".NET 6 & .NET 7 (Shared/MainLayout.razor)" %}
616-
617-
<div class="page">
618-
<div class="sidebar">
619-
<NavMenu />
620-
</div>
621-
622-
<main>
623-
<div class="top-row px-4">
624-
<CultureSwitcher />
625-
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
626-
</div>
627-
628-
<article class="content px-4">
629-
@Body
630-
</article>
631-
</main>
632-
</div>
633-
634-
{% endhighlight %}
635-
636541
{% highlight razor tabtitle=".NET 9 & .NET 8 (Components/Layout/MainLayout.razor)" %}
637542

638543
<div class="page">

0 commit comments

Comments
 (0)