Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Issue deploying sample app to Azure (Read 143 times)
davel
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Location: USA
Joined: Dec 3rd, 2007
Issue deploying sample app to Azure
Mar 17th, 2026 at 6:32pm
Print Post  
I was running into issues trying to deploy my app with Mindfusion diagrams to the free Azure tier. So I tried the same with the demo app you supplied (MinApp, .NET10) and I ran into the same issues.

The app runs fine locally, but when deployed, when you attempt to load a page with a DiagramView, in dev tools you can see errors trying to load libSkiaSharp library and its dependencies:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: libSkiaSharp
System.DllNotFoundException: libSkiaSharp
   at SkiaSharp.SKPaint..ctor((index))
   at Microsoft.Maui.Graphics.Skia.SkiaCanvasStateService.EnsureDefaults((index))
   at Microsoft.Maui.Graphics.Skia.SkiaCanvasStateService.CreateNew(/Object context)
   at .....

I'm pretty sure the Skia libs are a dependent of Mindfusion. I think it's as simple as instructing the site how to load the libs - as far as I can tell, all of the libs, wasms, etc are deployed to the server, but I guess they are not found.

i realize this is not really a Mindfusion issue - just a deployment issue, but I was hoping you might have some insight.

You can view the app at:
https://minapp-h9e6hhdcfbekgmbm.eastus2-01.azurewebsites.net/

Thanks, David


  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3473
Joined: Oct 19th, 2005
Re: Issue deploying sample app to Azure
Reply #1 - Mar 18th, 2026 at 9:25am
Print Post  
That appears to be pulled in transitively by the Microsoft.Maui.Graphics package we use.

I found a libSkiaSharp.a file under the nuget/packages/skiasharp.nativeassets.webassembly folder on my system, so it’s possible that Azure isn’t serving .a files by default.

You could try adding the following to your web.config:

Code
Select All
<configuration>
  <system.webServer>
    <staticContent>
      <mimeMap fileExtension=".a" mimeType="application/octet-stream" />
    </staticContent>
  </system.webServer>
</configuration> 



Please let me know if this doesn’t resolve the issue, and our developer will investigate further.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
davel
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Location: USA
Joined: Dec 3rd, 2007
Re: Issue deploying sample app to Azure
Reply #2 - Mar 18th, 2026 at 8:03pm
Print Post  
I tried the above along with a bunch of other changes. here is my latest configs:

csproj:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
     <TargetFramework>net10.0</TargetFramework>
     <Nullable>enable</Nullable>
     <ImplicitUsings>enable</ImplicitUsings>
     <WasmBuildNative>true</WasmBuildNative>
     <WasmNativeStrip>false</WasmNativeStrip>
     <PublishIISAssets>true</PublishIISAssets>
     <OverrideHtmlAssetPlaceholders>true</OverrideHtmlAssetPlaceholders>
     <PublishTrimmed>false</PublishTrimmed>
     <PublishReadyToRun>false</PublishReadyToRun>
</PropertyGroup>

<ItemGroup>
     <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.4" />
     <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.4" PrivateAssets="all" />
     <PackageReference Include="MindFusion.Diagramming.Blazor" Version="2.1.1" />
     <PackageReference Include="SkiaSharp" Version="3.119.2" />
     <PackageReference Include="SkiaSharp.Views.Blazor" Version="3.119.2" />
     <PackageReference Include="SkiaSharp.NativeAssets.WebAssembly" Version="3.119.2" />
</ItemGroup>

</Project>

web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<!-- To customize the asp.net core module uncomment and edit the following section.
For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->
<!--
<system.webServer>
<handlers>
<remove name="aspNetCore"/>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
-->

     <system.webServer>
           <staticContent>
                 <!-- Add this to allow the browser to download the native files -->
                 <remove fileExtension=".a" />
                 <mimeMap fileExtension=".a" mimeType="application/octet-stream" />

                 <!-- Also common for Blazor WASM native assets -->
                 <remove fileExtension=".wasm" />
                 <mimeMap fileExtension=".wasm" mimeType="application/wasm" />
           </staticContent>
     </system.webServer>


     </configuration>

I dd manage to deploy your balzortablenodes app on .net8, so I think I'll refactor for .net8.
https://blazortablenodes-c9f8hebtdrb7ckfx.eastus2-01.azurewebsites.net/

I'm pretty sure the issue is with the Azure runtime env.

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3473
Joined: Oct 19th, 2005
Re: Issue deploying sample app to Azure
Reply #3 - Mar 19th, 2026 at 9:38am
Print Post  
Hi David,

We have successfully deployed a working .NET 10 version of the MinApp to Azure, which you can view here:

https://salmon-bay-0d2f33710.1.azurestaticapps.net/

The project file looks like this:

Code
Select All
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <OverrideHtmlAssetPlaceholders>true</OverrideHtmlAssetPlaceholders>
    <WasmBuildNative>true</WasmBuildNative>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.4" />
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.4" PrivateAssets="all" />
    <PackageReference Include="MindFusion.Diagramming.Blazor" Version="2.1.2-beta1" />
    <PackageReference Include="SkiaSharp.Views.Blazor" Version="3.119.2" />
    <PackageReference Include="SkiaSharp.NativeAssets.WebAssembly" Version="3.119.2" />
  </ItemGroup>

</Project> 



We aren't exactly sure, but one of these or combination of them ensures that the SkiaSharp compiled C code is correctly linked into the WebAssembly binary:

- WasmBuildNative forces the Emscripten linker to include the .a files;
- explicit SkiaSharp.NativeAssets.WebAssembly package reference;
- web.config listing .wasm and .a files, which might not be served otherwise.

Our web.config looks like this:

Code
Select All
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <staticContent>
      <remove fileExtension=".wasm" />
      <mimeMap fileExtension=".wasm" mimeType="application/wasm" />
      <remove fileExtension=".json" />
      <mimeMap fileExtension=".json" mimeType="application/json" />
      <remove fileExtension=".a" />
      <mimeMap fileExtension=".a" mimeType="application/octet-stream" />
    </staticContent>
  </system.webServer>
</configuration> 



For more technical details on how Blazor handles these dependencies, you can refer to the Microsoft documentation here:

https://learn.microsoft.com/en-us/aspnet/core/blazor/webassembly-native-dependen...

Please let me know if this resolves the issue in your deployment.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
davel
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Location: USA
Joined: Dec 3rd, 2007
Re: Issue deploying sample app to Azure
Reply #4 - Mar 19th, 2026 at 2:29pm
Print Post  
Thanks very much!!! These configs worked with the sample code and with my actual real app under development.

I thnk it's the MIME defs in the web.config.

Thanks again
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint