<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>C# on HeavenGospel&#39;s blog</title>
        <link>https://blog.250512.xyz/en/categories/c%23/</link>
        <description>Recent content in C# on HeavenGospel&#39;s blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Wed, 21 Jan 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://blog.250512.xyz/en/categories/c%23/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Compatibility issues with ABP Bundle version 10</title>
        <link>https://blog.250512.xyz/en/p/blazor-webassembly/</link>
        <pubDate>Wed, 21 Jan 2026 00:00:00 +0800</pubDate>
        
        <guid>https://blog.250512.xyz/en/p/blazor-webassembly/</guid>
        <description>&lt;img src="https://img.250512.xyz/uploads/2026/01/1768983086344.png" alt="Featured image of post Compatibility issues with ABP Bundle version 10" /&gt;&lt;p&gt;Blazor WebAssembly + ABP 10.0.2 + .NET 10 Preview Release Compatibility Issues Record&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Conclusion: Currently, using .NET 10 + ABP 10.0.2 to publish Blazor WASM will encounter framework-level issues such as script loading and Service Worker caching. In the short term, it is more recommended to use the stable version of .NET 8 + ABP 8, or adopt a small number of manual script references as a temporary solution in the current project.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;1-phenomenon-normal-in-development-mode-white-screen-in-published-mode&#34;&gt;1. Phenomenon: Normal in Development Mode, White Screen in Published Mode
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Development mode (&lt;code&gt;dotnet run&lt;/code&gt; / IDE startup):
&lt;ul&gt;
&lt;li&gt;Blazor WebAssembly can be loaded normally.&lt;/li&gt;
&lt;li&gt;Login, OIDC, and ABP components all work normally.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Published mode (started from &lt;code&gt;bin/Release/net10.0/publish&lt;/code&gt; after &lt;code&gt;dotnet publish&lt;/code&gt;):
&lt;ul&gt;
&lt;li&gt;The page HTML can return 200.&lt;/li&gt;
&lt;li&gt;Most of the static resources (&lt;code&gt;global.css&lt;/code&gt;, &lt;code&gt;global.js&lt;/code&gt;, &lt;code&gt;dotnet.js&lt;/code&gt;, etc.) can return 200.&lt;/li&gt;
&lt;li&gt;But the front end does not render content in the end, and an exception appears in the console.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Typical error logs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;404 appears multiple times in the backend log:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;_framework/WHS.Blazor.Client.jqrq8onpr6.wasm&lt;/code&gt; 404.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;service-worker-assets.js&lt;/code&gt; 404.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Front-end console error:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Could not find &#39;AuthenticationService.init&#39; (&#39;AuthenticationService&#39; was undefined).&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Occurs in the &lt;code&gt;callEntryPoint&lt;/code&gt; stage of &lt;code&gt;blazor.web.js&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2-old-resource-caching-issue-caused-by-service-worker&#34;&gt;2. Old Resource Caching Issue Caused by Service Worker
&lt;/h2&gt;&lt;p&gt;Blazor PWA will by default:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Load &lt;code&gt;service-worker-assets.js&lt;/code&gt; through &lt;code&gt;service-worker.published.js&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Cache resources such as &lt;code&gt;blazor.boot.json&lt;/code&gt;, wasm, dll, css, js according to &lt;code&gt;assetsManifest&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The problem encountered with the combination of .NET 10 + ABP 10.0.2 is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After the first release, Service Worker will cache an old &lt;code&gt;blazor.boot.json&lt;/code&gt; and wasm hash.&lt;/li&gt;
&lt;li&gt;When the code is modified and published again, even if the new wasm file is already on the server:
&lt;ul&gt;
&lt;li&gt;The browser still preferentially takes the old version of &lt;code&gt;blazor.boot.json&lt;/code&gt; from the SW cache.&lt;/li&gt;
&lt;li&gt;As a result, the front end will request a non-existent &lt;code&gt;_framework/WHS.Blazor.Client.&amp;lt;old&amp;gt;.wasm&lt;/code&gt;, and the server returns 404.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Temporary solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In &lt;code&gt;App.razor&lt;/code&gt;, make a special judgment for localhost and unregister all registered Service Workers at startup:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;isLocalhost&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;location&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hostname&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;===&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;localhost&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;location&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hostname&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;===&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;127.0.0.1&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;serviceWorker&amp;#39;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;navigator&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;isLocalhost&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;addEventListener&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;load&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;async&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;registrations&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;await&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;navigator&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;serviceWorker&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getRegistrations&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;registration&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;of&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;registrations&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kr&#34;&gt;await&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;registration&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;unregister&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;For the production environment (non-localhost), &lt;code&gt;service-worker.published.js&lt;/code&gt; is still registered according to normal logic, retaining PWA capabilities.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;3-abp-core-js-not-injected-correctly&#34;&gt;3. ABP Core JS Not Injected Correctly
&lt;/h2&gt;&lt;p&gt;ABP Blazor relies on a set of core JS files, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/abp.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/lang-utils.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/authentication-state-listener.js&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;According to ABP&amp;rsquo;s design, these scripts are usually:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;AbpBundlingOptions&lt;/code&gt; + &lt;code&gt;BlazorWebAssemblyStandardBundles.Scripts.Global&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;!--ABP:Scripts--&amp;gt;&lt;/code&gt; + &lt;code&gt;app.MapAbpStaticAssets()&lt;/code&gt;;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Automatically injected into the page.&lt;/p&gt;
&lt;p&gt;In the new &amp;ldquo;Razor Components + Interactive WebAssembly&amp;rdquo; mode of .NET 10 + ABP 10.0.2 + Blazor, it is actually observed that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In the published mode, when &lt;code&gt;blazor.web.js&lt;/code&gt; starts, the above scripts may not have been loaded yet.&lt;/li&gt;
&lt;li&gt;Result: The &lt;code&gt;AuthenticationService&lt;/code&gt; or &lt;code&gt;abp&lt;/code&gt; object is &lt;code&gt;undefined&lt;/code&gt;, triggering an error that &lt;code&gt;AuthenticationService.init&lt;/code&gt; cannot be found.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Temporary solution: Manually hardcode core script references and place them before &lt;code&gt;blazor.web.js&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;abp-application-layout&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c&#34;&gt;&amp;lt;!-- .NET 10 + ABP 10.0.2 compatibility fix: core JS is loaded synchronously in advance --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/abp.js&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/lang-utils.js&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/authentication-state-listener.js&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;_framework/blazor.web.js&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c&#34;&gt;&amp;lt;!-- The following are the application container and ABP automatically injected global.js, etc. --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This ensures that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When &lt;code&gt;blazor.web.js&lt;/code&gt; calls the .NET entry point, the relevant JS APIs are already available in &lt;code&gt;window&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;4-why-manually-referencing-scripts-is-a-temporary-solution&#34;&gt;4. Why Manually Referencing Scripts is a &amp;ldquo;Temporary Solution&amp;rdquo;
&lt;/h2&gt;&lt;p&gt;Advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can quickly bypass the automatic Bundling/injection problem of the current version and make the application available in the published mode.&lt;/li&gt;
&lt;li&gt;It is easier to troubleshoot and control the script loading order.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Disadvantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lose the benefits of automatic merging, compression, and version hashing brought by the ABP Bundling system.&lt;/li&gt;
&lt;li&gt;After ABP or .NET is upgraded, if the script path or file name changes, you need to manually maintain these &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;May be duplicated with the content injected by &lt;code&gt;&amp;lt;!--ABP:Scripts--&amp;gt;&lt;/code&gt; (be careful not to load the same script twice).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, it is recommended to explicitly mark it as &amp;ldquo;compatibility fix / TODO&amp;rdquo; in the code, and it can be cleaned up after the framework is fixed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;&amp;lt;!--
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;.NET 10 + ABP 10.0.2 published mode compatibility fix:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;Manually hardcode the core JS files to ensure synchronous loading before blazor.web.js starts.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;ABP&amp;#39;s automatic script injection may fail in the published mode (timing / path problem).
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;TODO: After ABP or .NET is fixed, remove the manual reference and restore the use of ABP automatic injection.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;--&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;5-summary&#34;&gt;5. Summary
&lt;/h2&gt;&lt;p&gt;​	ABP 10.0.2 building Blazor WebAssembly does have a series of script and cache compatibility issues in the published mode. Before the official version is fully polished, &lt;strong&gt;&amp;ldquo;considering reverting to the .NET 8 stable stack&amp;rdquo;&lt;/strong&gt; is a more pragmatic choice in engineering.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
