Skip to content

Conversation

@KevinRansom
Copy link
Contributor

@KevinRansom KevinRansom commented Dec 7, 2021

When executing the FSharp.Compiler.ComponentTests under visual studio every test that relied on App Domains failed. I have no idea how long this has been going on or when it was introduced. I suspect it's been a while. I also supsect some changes in the test hosting under VS, but it could also have been changes we have done in probing I suppose.

The solution has been to add a AlreadyLoadedAppDomainResolver when creating the worker, the issue is that a FSharp.Test.Utilities.dll is loaded in an appdomain, via loadfrom. Since it is not resolvable under vs because the vs host is not in artifacts. When we create the appdomain the marshalling needs to do an assembly load. We handle this using the new AlreadyLoadedAppDomainResolver, which checks already loaded assemblies when the resolve fails.

Oh yeah and adds a new command line option to build to just build the FSharp.Compiler.ComponentTests, and re-aligns the help text:
-testCompilerComponentTests

Fixes: #12495

@KevinRansom KevinRansom merged commit 03cb47b into dotnet:main Dec 8, 2021
@KevinRansom KevinRansom deleted the fixcomponenttestsundervs branch January 21, 2022 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

net472 FSharp.Compiler.ComponentTests suite fails using VS2022 but passes on command line

2 participants