Skip to content

BlazorWASM-SWA: BadImageFormatException: This PE image is not a managed executable #1187

@Pete-Nago

Description

@Pete-Nago

Bug Report

  • At what date and time did you most recently experience the problem?
    Dec.15, 1pm (GMT+8)

  • Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use.
    Azure Static Web App - building via Github Actions

  • If your repo is publicly available please share its URL:
    not public

  • What happened?
    Oryx fails to build Blazor WASM proj.
    Local build succeeds via Visual Studio 2022.

  • What did you expect or want to happen?
    Oryx build should succeed.

  • How can we reproduce it?
    not sure how because repo is private

  • Do you have log output? Please include between the backticks:

  Determining projects to restore...
  All projects are up-to-date for restore.
  Tools6 -> /github/workspace/Tools6/bin/Release/net6.0/Tools6.dll
  Shared -> /github/workspace/Shared/bin/Release/net6.0/Shared.dll
  Client -> /github/workspace/Client/bin/Release/net6.0/Client.dll
  Client (Blazor output) -> /github/workspace/Client/bin/Release/net6.0/wwwroot
  Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Tools6 -> /github/workspace/Tools6/bin/Release/net6.0/Tools6.dll
  Shared -> /github/workspace/Shared/bin/Release/net6.0/Shared.dll
  Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
/opt/dotnet/6.0.100/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.1/Sdk/WasmApp.Native.targets(240,5): error MSB4018: The "PInvokeTableGenerator" task failed unexpectedly. [/github/workspace/Client/Client.csproj]
/opt/dotnet/6.0.100/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.1/Sdk/WasmApp.Native.targets(240,5): error MSB4018: System.BadImageFormatException: This PE image is not a managed executable. [/github/workspace/Client/Client.csproj]
/opt/dotnet/6.0.100/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.1/Sdk/WasmApp.Native.targets(240,5): error MSB4018:    at System.Reflection.MetadataLoadContext.LoadFromStreamCore(Stream peStream) [/github/workspace/Client/Client.csproj]
/opt/dotnet/6.0.100/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.1/Sdk/WasmApp.Native.targets(240,5): error MSB4018:    at System.Reflection.MetadataLoadContext.LoadFromAssemblyPath(String assemblyPath) [/github/workspace/Client/Client.csproj]
/opt/dotnet/6.0.100/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.1/Sdk/WasmApp.Native.targets(240,5): error MSB4018:    at PInvokeTableGenerator.GenPInvokeTable(String[] pinvokeModules, String[] assemblies) [/github/workspace/Client/Client.csproj]
/opt/dotnet/6.0.100/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.1/Sdk/WasmApp.Native.targets(240,5): error MSB4018:    at PInvokeTableGenerator.Execute() [/github/workspace/Client/Client.csproj]
/opt/dotnet/6.0.100/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.1/Sdk/WasmApp.Native.targets(240,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/github/workspace/Client/Client.csproj]
/opt/dotnet/6.0.100/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.1/Sdk/WasmApp.Native.targets(240,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/github/workspace/Client/Client.csproj]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions