Description
In effort to run library tests with AOT compilation on CI #46633, there are a number of failures arising from #46651.
Test suite System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj
fails on MonoAOTCompiler task with
/Users/mdhwang/runtime_wasm_clean/src/mono/wasm/build/WasmApp.targets(43,5): error : Can not open image /Users/mdhwang/runtime_wasm_clean/artifacts/bin/System.Diagnostics.FileVersionInfo.Tests/net6.0-Browser-Release/browser-wasm/publish/NativeLibrary.dll [/Users/mdhwang/runtime_wasm_clean/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj]
/Users/mdhwang/runtime_wasm_clean/src/mono/wasm/build/WasmApp.targets(43,5): error : Precompiling failed for /Users/mdhwang/runtime_wasm_clean/artifacts/bin/System.Diagnostics.FileVersionInfo.Tests/net6.0-Browser-Release/browser-wasm/publish/NativeLibrary.dll: Error: Can not open image /Users/mdhwang/runtime_wasm_clean/artifacts/bin/System.Diagnostics.FileVersionInfo.Tests/net6.0-Browser-Release/browser-wasm/publish/NativeLibrary.dll [/Users/mdhwang/runtime_wasm_clean/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj]
/Users/mdhwang/runtime_wasm_clean/src/mono/wasm/build/WasmApp.targets(43,5): error : [/Users/mdhwang/runtime_wasm_clean/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj]
/Users/mdhwang/runtime_wasm_clean/src/mono/wasm/build/WasmApp.targets(43,5): error : [/Users/mdhwang/runtime_wasm_clean/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj]
System_diagnostics_fileversioninfo_fail.txt
Repro
Check out changes in #46651
./build.sh -os Browser -arch wasm -c Release
Remove
runtime/eng/testing/ILLink.Descriptor.xunit.xml
Lines 15 to 20 in f7f5046
Modify to be an empty catch
catch
{
}
./dotnet.sh build /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj