Skip to content

[wasm][aot] build tries to cross compile unrelated dlls from the publish folder #46856

Description

@mdh1418

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

<!-- 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)
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions