-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Description
Error message
dotnet run
Unhandled exception. System.TypeLoadException: Could not load type 'Program' from assembly 'test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
Reproduction Steps
code
await TestAsync();
async Task TestAsync() {
await Task.Yield();
}
csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Features>$(Features);runtime-async=on</Features>
<NoWarn>SYSLIB5007</NoWarn>
</PropertyGroup>
</Project>
run dotnet run
Expected behavior
It should not throw exceptions
Actual behavior
Could not load type 'Program' from assembly
Regression?
No response
Known Workarounds
N/A
Configuration
dotnet --version
10.0.100-rc.1.25451.107
lscpu
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: ARM
Model name: Cortex-A53
Model: 4
Thread(s) per core: 1
Core(s) per cluster: 4
Socket(s): -
Cluster(s): 1
Stepping: r0p4
CPU(s) scaling MHz: 50%
CPU max MHz: 1200.0000
CPU min MHz: 600.0000
BogoMIPS: 38.40
Flags: fp asimd evtstrm crc32 cpuid
Caches (sum of all):
L1d: 128 KiB (4 instances)
L1i: 128 KiB (4 instances)
L2: 512 KiB (1 instance)
Vulnerabilities:
Gather data sampling: Not affected
Ghostwrite: Not affected
Indirect target selection: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Reg file data sampling: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Not affected
Spectre v1: Mitigation; __user pointer sanitization
Spectre v2: Not affected
Srbds: Not affected
Tsx async abort: Not affected
uname
Linux pi 6.14.0-1013-raspi dotnet/runtime#13-Ubuntu SMP PREEMPT_DYNAMIC Tue Aug 19 13:57:45 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
Other information
No response
Metadata
Metadata
Assignees
Type
Projects
Status
No status