From f550f2d19ff0b0fdd93010058fe808f71cc9dd93 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Wed, 10 Jun 2026 17:21:27 +0300 Subject: [PATCH 1/6] Add missing TestLibrary reference for BuildAllTestsAsStandalone=true This fixes: error CS0103: The name 'TestLibrary' does not exist in the current context --- src/tests/async/capacity/capacity.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/async/capacity/capacity.csproj b/src/tests/async/capacity/capacity.csproj index d74af313bba791..198d9ea843af16 100644 --- a/src/tests/async/capacity/capacity.csproj +++ b/src/tests/async/capacity/capacity.csproj @@ -7,5 +7,6 @@ + From 736cfe73431c7f9df1bad4019f75ce6b96a33149 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Wed, 10 Jun 2026 19:55:31 +0300 Subject: [PATCH 2/6] Fix empty module error for BuildAllTestsAsStandalone=true This fixes: /home/runtime/src/tests/JIT/Directed/tailcall/mutual_recursion.fs(564,19): error FS0988: Main module of program is empty: nothing will happen when it is run [/home/runtime/src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj] [/home/runtime/src/tests/build.proj] --- src/tests/JIT/Directed/tailcall/mutual_recursion.fs | 6 ++++++ .../Regression/JitBlue/Runtime_87393/Runtime_87393.fs | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/tests/JIT/Directed/tailcall/mutual_recursion.fs b/src/tests/JIT/Directed/tailcall/mutual_recursion.fs index ac6a167c1167a5..18dd2cdfeaa9d5 100644 --- a/src/tests/JIT/Directed/tailcall/mutual_recursion.fs +++ b/src/tests/JIT/Directed/tailcall/mutual_recursion.fs @@ -562,3 +562,9 @@ type Driver() = let main () = let driver = Driver() driver.Start() + +[] +let entryPoint _argv = + let driver = Driver() + driver.Start() + 100 diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_87393/Runtime_87393.fs b/src/tests/JIT/Regression/JitBlue/Runtime_87393/Runtime_87393.fs index 8f778af184b2b0..878422ac9ce33c 100644 --- a/src/tests/JIT/Regression/JitBlue/Runtime_87393/Runtime_87393.fs +++ b/src/tests/JIT/Regression/JitBlue/Runtime_87393/Runtime_87393.fs @@ -41,3 +41,13 @@ module Main = let v = f.M 0 65000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Assert.Equal(2112532500, v) + [] + let entryPoint _argv = + let f : Foo = Bar() + let v = f.M 0 65000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + if v = 2112532500 then + printfn "PASS" + 100 + else + printfn "FAIL: Result was %A" v + -1 From 5e2ae4dbbaf98aae5a50e5798bda5b5bad24b426 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Thu, 11 Jun 2026 15:40:04 +0300 Subject: [PATCH 3/6] Fix no entry error for BuildAllTestsAsStandalone=true This fixes: EXEC : error : No entry point declared for executable [/home/runtime/src/tests/JIT/Methodical/int64/unsigned/implicit_promotion_il.ilproj] [/home/runtime/src/tests/build.proj] --- .../JIT/Methodical/int64/unsigned/implicit_promotion_il.ilproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/JIT/Methodical/int64/unsigned/implicit_promotion_il.ilproj b/src/tests/JIT/Methodical/int64/unsigned/implicit_promotion_il.ilproj index 8a3f6ca933bfaf..e53b78dc2614ad 100644 --- a/src/tests/JIT/Methodical/int64/unsigned/implicit_promotion_il.ilproj +++ b/src/tests/JIT/Methodical/int64/unsigned/implicit_promotion_il.ilproj @@ -1,5 +1,6 @@ + Library PdbOnly From 3307af1cb200fc157f157f6cad536672b9bfbfb8 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Thu, 11 Jun 2026 16:19:17 +0300 Subject: [PATCH 4/6] Fix no Main method error for BuildAllTestsAsStandalone=true This fixes: CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [/home/runtime/src/tests/tracing/userevents/common/userevents_common.csproj] [/home/runtime/src/tests/build.proj] --- src/tests/tracing/userevents/common/userevents_common.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/tracing/userevents/common/userevents_common.csproj b/src/tests/tracing/userevents/common/userevents_common.csproj index dff80ae7a50008..7bd07ede4fb1c6 100644 --- a/src/tests/tracing/userevents/common/userevents_common.csproj +++ b/src/tests/tracing/userevents/common/userevents_common.csproj @@ -2,6 +2,7 @@ BuildOnly false + Library From 0a9d0f466f18305256b57acc83743dec32bb24a5 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Thu, 11 Jun 2026 17:06:46 +0300 Subject: [PATCH 5/6] Add non-self-contained build support --- src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj b/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj index 5b06ca87506641..73be2204a52e9c 100644 --- a/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj +++ b/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj @@ -5,9 +5,9 @@ $(NetCoreAppToolCurrent) true true - true + true true - true + true false From 804a6deb7739a801bddb05b6e295b41bfcdcfa57 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Thu, 25 Jun 2026 14:04:33 +0300 Subject: [PATCH 6/6] Fix no entry error for BuildAllTestsAsStandalone=true This fixes: EXEC : error : No entry point declared for executable [/home/runtime/src/tests/async/asyncversions/asyncversions.ilproj] [/home/runtime/src/tests/build.proj] --- .../async/asyncversions/asyncversions.il | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/tests/async/asyncversions/asyncversions.il b/src/tests/async/asyncversions/asyncversions.il index 602bab480b851f..8e13580bb00306 100644 --- a/src/tests/async/asyncversions/asyncversions.il +++ b/src/tests/async/asyncversions/asyncversions.il @@ -210,4 +210,28 @@ callvirt instance void [System.Runtime]System.Threading.Tasks.Task::Wait() ret } + + // --- Entry point for standalone executable --------------------------- + + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + .maxstack 1 + + .try + { + call void AsyncVersions::JmpToSuspendingTest() + call void AsyncVersions::JmpToCompletedTest() + call void AsyncVersions::TailToSuspendingTest() + call void AsyncVersions::TailToCompletedTest() + ldc.i4.s 100 + ret + } + catch [System.Runtime]System.Exception + { + pop + ldc.i4.s 101 + ret + } + } }