- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
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
| <!-- Temporary until https://github.com/mono/linker/issues/1713 is resolved --> | |
| <assembly fullname="Microsoft.DotNet.RemoteExecutor"> | |
| <type fullname="Microsoft.DotNet.RemoteExecutor.Program"> | |
| <method signature="System.Int32 Main(System.String[])" /> | |
| </type> | |
| </assembly> | 
Modify
| catch (Exception e) when (IsIoRelatedException(e) && !disposing) | 
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