Skip to content

Commit

Permalink
Fix UseWebAssembly && !SampleContent
Browse files Browse the repository at this point in the history
  • Loading branch information
halter73 committed Sep 20, 2023
1 parent fd85341 commit 5462e42
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.EntityFrameworkCore;
#endif
#if (UseWebAssembly)
#if (UseWebAssembly && SampleContent)
using BlazorWeb_CSharp.Client.Pages;
#endif
using BlazorWeb_CSharp.Components;
Expand Down Expand Up @@ -104,19 +104,22 @@ public static void Main(string[] args)

#if (UseServer && UseWebAssembly)
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(Counter).Assembly);
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
#elif (UseServer)
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
.AddInteractiveServerRenderMode();
#elif (UseWebAssembly)
app.MapRazorComponents<App>()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(Counter).Assembly);
.AddInteractiveWebAssemblyRenderMode()
#else
app.MapRazorComponents<App>();
#endif
#if (UseWebAssembly && SampleContent)
.AddAdditionalAssemblies(typeof(Counter).Assembly);
#elif (UseWebAssembly)
.AddAdditionalAssemblies(typeof(Client._Imports).Assembly);
#endif

#if (IndividualLocalAuth)
// Add additional endpoints required by the Identity /Account Razor components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.EntityFrameworkCore;
#endif
#if (UseWebAssembly)
#if (UseWebAssembly && SampleContent)
using BlazorWeb_CSharp.Client.Pages;
#endif
using BlazorWeb_CSharp.Components;
Expand Down Expand Up @@ -101,17 +101,20 @@
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(Counter).Assembly);
#elif (UseServer)
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
#elif (UseWebAssembly)
app.MapRazorComponents<App>()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(Counter).Assembly);
#else
app.MapRazorComponents<App>();
#endif
#if (UseWebAssembly && SampleContent)
.AddAdditionalAssemblies(typeof(Counter).Assembly);
#elif (UseWebAssembly)
.AddAdditionalAssemblies(typeof(BlazorWeb_CSharp.Client._Imports).Assembly);
#endif

#if (IndividualLocalAuth)
// Add additional endpoints required by the Identity /Account Razor components.
Expand Down

0 comments on commit 5462e42

Please sign in to comment.