Skip to content

Conversation

LoopedBard3
Copy link
Member

@LoopedBard3 LoopedBard3 commented Feb 27, 2024

With the Microsoft.NET.Test.Sdk now implicitly referenced based on this warning:

Microsoft.NET.Sdk.DefaultItems.Shared.targets(152,5): warning NETSDK1023: A PackageReference for 'Microsoft.NET.Test.Sdk' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs [/home/pbibus/performance/src/benchmarks/micro/MicroBenchmarks.csproj::TargetFramework=net9.0]

Some sort of dll interaction was casuing the issue: https://stackoverflow.com/questions/62447717/system-typeloadexception-vtable-setup-of-type-xamarin-forms-formsandroidplatf. Removing the package reference from the MicroBenchmarks.csproj file fixes the issue.

This should fix: dotnet/runtime#98967
Tested locally using benchmarks_local.py.
Test run: https://dev.azure.com/dnceng/internal/_build/results?buildId=2389129&view=results

Open to other suggestions for the exact change.

…Test.Sdk' from Microbenchmark.csproj as it is already being imported by the test adapter.
@LoopedBard3 LoopedBard3 added bug Something isn't working dependencies Pull requests that update a dependency file labels Feb 27, 2024
@LoopedBard3 LoopedBard3 self-assigned this Feb 27, 2024
@DrewScoggins
Copy link
Member

Does this get rid of the warning?

@LoopedBard3
Copy link
Member Author

LoopedBard3 commented Feb 27, 2024

It did in local testing. Just kicked the test run and hopefully it will get rid of the warning there as well. (Both the warning and MonoAOT build failure go away).

@caaavik-msft
Copy link
Contributor

This package needs to be referenced directly in the project for the VSTest adapter to work, but if it is causing things to fail then it's ok to get this in while I find an alternative later.

@LoopedBard3 LoopedBard3 marked this pull request as ready for review February 27, 2024 23:02
@LoopedBard3
Copy link
Member Author

Still waiting for the runtime-perf test run to finish, but the sdk_scenarios 8.0 failures in the performance-ci pipeline are not related to this change.

@LoopedBard3
Copy link
Member Author

Testing runs succeeded. Will merge with approval 👍.

@LoopedBard3 LoopedBard3 merged commit 150dae5 into dotnet:main Feb 28, 2024
@LoopedBard3 LoopedBard3 deleted the FixMonoAOTFailureDueToMultipleTestSDKs branch February 28, 2024 18:51
@LoopedBard3
Copy link
Member Author

It looks like this removal is the likely cause of a new error in wasm AOT runs:

[Microsoft.VisualStudio.TestPlatform.Common.dll] Exec (with response file contents expanded) in /home/pbibus/performance/artifacts/bin/MicroBenchmarks/Release/net9.0/Job-ZIZMTN/obj/Release/net9.0/wasm/for-publish/aot-in: MONO_PATH=/home/pbibus/performance/artifacts/bin/MicroBenchmarks/Release/net9.0/Job-ZIZMTN/obj/Release/net9.0/wasm/for-publish/aot-in:/home/pbibus/performance/scripts/runtime-testing-artifacts/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/9.0.0-preview.3.24128.2/runtimes/browser-wasm/native/:/home/pbibus/performance/scripts/runtime-testing-artifacts/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/9.0.0-preview.3.24128.2/runtimes/browser-wasm/lib/net9.0 MONO_ENV_OPTIONS= /home/pbibus/performance/scripts/runtime-testing-artifacts/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.browser-wasm/9.0.0-preview.3.24128.2/Sdk/../tools/mono-aot-cross --wasm-exceptions --debug --llvm "--aot=no-opt,static,direct-icalls,deterministic,mattr=simd,dwarfdebug,llvm-path=/home/pbibus/performance/scripts/runtime-testing-artifacts/dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.linux-x64/9.0.0-preview.3.24128.1/tools/bin/,static,dedup-skip,trimming-eligible-methods-outfile=/home/pbibus/performance/artifacts/bin/MicroBenchmarks/Release/net9.0/Job-ZIZMTN/obj/Release/net9.0/wasm/for-publish/tokens/Microsoft_VisualStudio_TestPlatform_Common_dll_compiled_methods.txt,llvmonly,interp,asmonly,llvm-outfile=/home/pbibus/performance/artifacts/bin/MicroBenchmarks/Release/net9.0/Job-ZIZMTN/obj/Release/net9.0/wasm/for-publish/Microsoft.VisualStudio.TestPlatform.Common.dll.bc.tmp,temp-path=/home/pbibus/performance/artifacts/bin/MicroBenchmarks/Release/net9.0/Job-ZIZMTN/obj/Release/net9.0/wasm/for-publish/Microsoft.VisualStudio.TestPlatform.Common.dll.tmp" "Microsoft.VisualStudio.TestPlatform.Common.dll"

I think we should still keep this change for now as WasmAOT is also broken by something else dotnet/runtime#98960, but I will make a tracking issue to get the Test.Sdk added back in somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PERF] Mono AOT BDN runs failing to build "Unable to compile method"
3 participants