-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable VS Test Explorer without the -vs switch #36126
Conversation
Tagging subscribers to this area: @ViktorHofer |
Failure is #29642 |
Thank you @ViktorHofer! |
Does this mean that when we run |
For running the tests it should because it will use the testhost, but what I don't think it will work, will be building/intellisense of projects that have a ReferenceFromRuntime to S.P.CoreLib for example. We should figure out how to make that work. |
It picks the runtime that's present in the matching testhost folder. Means if you build against Debug it picks the runtime that's present in the debug testhost which depends on the
There are hacky ways to support that, like setting environment variables inside VS or opening it with an env var being set. You could temporarily set the As a side note, going forward I hope we can use a P2P against the right CoreLib instead of a named reference. |
Because of the way we resolve the reference from runtime. We translate it to a reference to System.Private.CoreLib.dll and that uses RuntimeConfiguration to resolve the location of corelib to reference it. |
OK, so switching these |
Are you guys over-thinking this? I wouldn't expect CoreLib's surface area to change based on RuntimeConfiguration (though, unfortunately it does based on OS). As such it won't really matter what S.P.C is used at build time so long as it exists. FWIW I don't see how using a P2P is going to change anything here, except maybe force a rebuild of a different S.P.C than is in testhost. |
I think @safern's point is that referenceFromRuntime resolves CoreLib based on the |
I see. We could drop a props file as part of pretest that would indicate what CoreLib to use and use that when building in VS. I can also imagine a P2P making this better, but I'm not sure how far out that work is. Let's stop this discussion in merged PR. Test the hypothetical and file an issue if something's broken. |
Filed #36464 to continue the discussion. |
Creating an intermediate runsettings file outside of the app's OutDir to enable VS Test Explorer support without the -vs switch.
I'll remove the -vs switch in the next batched rollout and for now added a warning that the switch will be removed eventually.
Either a clean build or a libs.pretest (subset) build is necessary to consume the change locally.
cc @ericstj @danmosemsft @stephentoub @ManickaP